From: Kumari Pallavi <kumari.pallavi@oss.qualcomm.com>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Cc: kpallavi@qti.qualcomm.com, srini@kernel.org,
amahesh@qti.qualcomm.com, arnd@arndb.de,
gregkh@linuxfoundation.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, quic_bkumar@quicinc.com,
ekansh.gupta@oss.qualcomm.com, linux-kernel@vger.kernel.org,
quic_chennak@quicinc.com, dri-devel@lists.freedesktop.org,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
jingyi.wang@oss.qualcomm.com, aiqun.yu@oss.qualcomm.com,
ktadakam@qti.qualcomm.com
Subject: Re: [PATCH v5 4/4] misc: fastrpc: Update dma_bits for CDSP support on Kaanapali SoC
Date: Mon, 8 Dec 2025 12:34:47 +0530 [thread overview]
Message-ID: <5f4efb71-4d39-45e4-bb0f-dd3c3c5b3a28@oss.qualcomm.com> (raw)
In-Reply-To: <l6pf6zoz3sfawnsdmtacczykg2dgnaw4x26dfg4o3al44y7fc5@vgzd5s4uygm6>
On 12/6/2025 8:01 AM, Dmitry Baryshkov wrote:
> On Tue, Dec 02, 2025 at 11:36:28AM +0530, Kumari Pallavi wrote:
>> DSP currently supports 32-bit IOVA (32-bit PA + 4-bit SID) for
>> both Q6 and user DMA (uDMA) access. This is being upgraded to
>> 34-bit PA + 4-bit SID due to a hardware revision in CDSP for
>> Kaanapali SoC, which expands the DMA addressable range.
>> Update DMA bits configuration in the driver to support CDSP on
>> Kaanapali SoC. Set the default `dma_bits` to 32-bit and update
>> it to 34-bit based on CDSP and OF matching on the fastrpc node.
>>
>> Signed-off-by: Kumari Pallavi <kumari.pallavi@oss.qualcomm.com>
>> ---
>> drivers/misc/fastrpc.c | 15 +++++++++++++--
>> 1 file changed, 13 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
>> index 6a67daafeaa1..c5d2c426fcbc 100644
>> --- a/drivers/misc/fastrpc.c
>> +++ b/drivers/misc/fastrpc.c
>> @@ -269,6 +269,8 @@ struct fastrpc_session_ctx {
>>
>> struct fastrpc_soc_data {
>> u32 sid_pos;
>> + u32 dma_addr_bits_extended;
>
> s/extended/cdsp/
>
Thanks for your feedback.
Here, i have used extended instead of the cdsp as to replace the
domain-based naming with functional naming. Currently, CDSP supports an
extended DMA address width of 34 bits due to specific use cases, but
this could change in the future for other DSPs as well.
Using names like "dma_addr_bits_extended" and "dma_addr_bits_default"
would keep the design flexible and independent of domain.
Reference of the earlier conversation regarding the change of the name
s/cdsp/extended
https://lore.kernel.org/all/e0d039e8-8f65-4e2e-9b73-74036dc0bb8d@oss.qualcomm.com/
Thanks,
Pallavi
>> + u32 dma_addr_bits_default;
>> };
>>
>> struct fastrpc_channel_ctx {
>> @@ -2189,6 +2191,7 @@ static int fastrpc_cb_probe(struct platform_device *pdev)
>> int i, sessions = 0;
>> unsigned long flags;
>> int rc;
>> + u32 dma_bits;
>>
>> cctx = dev_get_drvdata(dev->parent);
>> if (!cctx)
>> @@ -2202,12 +2205,16 @@ static int fastrpc_cb_probe(struct platform_device *pdev)
>> spin_unlock_irqrestore(&cctx->lock, flags);
>> return -ENOSPC;
>> }
>> + dma_bits = cctx->soc_data->dma_addr_bits_default;
>> sess = &cctx->session[cctx->sesscount++];
>> sess->used = false;
>> sess->valid = true;
>> sess->dev = dev;
>> dev_set_drvdata(dev, sess);
>>
>> + if (cctx->domain_id == CDSP_DOMAIN_ID)
>> + dma_bits = cctx->soc_data->dma_addr_bits_extended;
>> +
>> if (of_property_read_u32(dev->of_node, "reg", &sess->sid))
>> dev_info(dev, "FastRPC Session ID not specified in DT\n");
>>
>> @@ -2222,9 +2229,9 @@ static int fastrpc_cb_probe(struct platform_device *pdev)
>> }
>> }
>> spin_unlock_irqrestore(&cctx->lock, flags);
>> - rc = dma_set_mask(dev, DMA_BIT_MASK(32));
>> + rc = dma_set_mask(dev, DMA_BIT_MASK(dma_bits));
>> if (rc) {
>> - dev_err(dev, "32-bit DMA enable failed\n");
>> + dev_err(dev, "%u-bit DMA enable failed\n", dma_bits);
>> return rc;
>> }
>>
>> @@ -2311,10 +2318,14 @@ static int fastrpc_get_domain_id(const char *domain)
>>
>> static const struct fastrpc_soc_data kaanapali_soc_data = {
>> .sid_pos = 56,
>> + .dma_addr_bits_extended = 34,
>> + .dma_addr_bits_default = 32,
>> };
>>
>> static const struct fastrpc_soc_data default_soc_data = {
>> .sid_pos = 32,
>> + .dma_addr_bits_extended = 32,
>> + .dma_addr_bits_default = 32,
>> };
>>
>> static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
>> --
>> 2.34.1
>>
>
next prev parent reply other threads:[~2025-12-08 7:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-02 6:06 [PATCH v5 0/4] Add ADSP and " Kumari Pallavi
2025-12-02 6:06 ` [PATCH v5 1/4] dt-bindings: misc: qcom,fastrpc: Add compatible for Kaanapali Kumari Pallavi
2025-12-02 8:17 ` Krzysztof Kozlowski
2025-12-02 10:01 ` Kumari Pallavi
2025-12-05 8:33 ` Krzysztof Kozlowski
2025-12-02 6:06 ` [PATCH v5 2/4] misc: fastrpc: Rename phys to dma_addr for clarity Kumari Pallavi
2025-12-06 2:26 ` Dmitry Baryshkov
2025-12-08 7:08 ` Kumari Pallavi
2025-12-02 6:06 ` [PATCH v5 3/4] misc: fastrpc: Add support for new DSP IOVA formatting Kumari Pallavi
2025-12-06 2:30 ` Dmitry Baryshkov
2025-12-08 7:26 ` Kumari Pallavi
2025-12-09 22:52 ` Dmitry Baryshkov
2025-12-02 6:06 ` [PATCH v5 4/4] misc: fastrpc: Update dma_bits for CDSP support on Kaanapali SoC Kumari Pallavi
2025-12-06 2:31 ` Dmitry Baryshkov
2025-12-08 7:04 ` Kumari Pallavi [this message]
2025-12-09 22:55 ` Dmitry Baryshkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5f4efb71-4d39-45e4-bb0f-dd3c3c5b3a28@oss.qualcomm.com \
--to=kumari.pallavi@oss.qualcomm.com \
--cc=aiqun.yu@oss.qualcomm.com \
--cc=amahesh@qti.qualcomm.com \
--cc=arnd@arndb.de \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=ekansh.gupta@oss.qualcomm.com \
--cc=gregkh@linuxfoundation.org \
--cc=jingyi.wang@oss.qualcomm.com \
--cc=kpallavi@qti.qualcomm.com \
--cc=krzk+dt@kernel.org \
--cc=ktadakam@qti.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_bkumar@quicinc.com \
--cc=quic_chennak@quicinc.com \
--cc=robh@kernel.org \
--cc=srini@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®