From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Cc: Ling Xu <quic_lxu5@quicinc.com>,
andersson@kernel.org, konradybcio@kernel.org, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org,
amahesh@qti.qualcomm.com, arnd@arndb.de,
gregkh@linuxfoundation.org, quic_kuiw@quicinc.com,
quic_ekangupt@quicinc.com, linux-arm-msm@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 2/3] misc: fastrpc: add support for gpdsp remoteproc
Date: Mon, 24 Mar 2025 13:29:30 +0000 [thread overview]
Message-ID: <90f2bcab-d89f-40c0-9851-7ff25f2c1eda@linaro.org> (raw)
In-Reply-To: <5r72xrv5rtw6bemh5onygkroyasroviijlta4hvwgm5c5hzvax@3icylchlufu3>
On 21/03/2025 14:07, Dmitry Baryshkov wrote:
> On Thu, Mar 20, 2025 at 05:11:20PM +0000, Srinivas Kandagatla wrote:
>>
>>
>> On 20/03/2025 09:14, Ling Xu wrote:
>>> The fastrpc driver has support for 5 types of remoteprocs. There are
>>> some products which support GPDSP remoteprocs. Add changes to support
>>> GPDSP remoteprocs.
>>>
>>> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
>>> Signed-off-by: Ling Xu <quic_lxu5@quicinc.com>
>>> ---
>>> drivers/misc/fastrpc.c | 10 ++++++++--
>>> 1 file changed, 8 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
>>> index 7b7a22c91fe4..80aa554b3042 100644
>>> --- a/drivers/misc/fastrpc.c
>>> +++ b/drivers/misc/fastrpc.c
>>> @@ -28,7 +28,9 @@
>>> #define SDSP_DOMAIN_ID (2)
>>> #define CDSP_DOMAIN_ID (3)
>>> #define CDSP1_DOMAIN_ID (4)
>>> -#define FASTRPC_DEV_MAX 5 /* adsp, mdsp, slpi, cdsp, cdsp1 */
>>> +#define GDSP0_DOMAIN_ID (5)
>>> +#define GDSP1_DOMAIN_ID (6)
>>
>> We have already made the driver look silly here, Lets not add domain ids for
>> each instance, which is not a scalable.
>>
>> Domain ids are strictly for a domain not each instance.
>>
>>
>>> +#define FASTRPC_DEV_MAX 7 /* adsp, mdsp, slpi, cdsp, cdsp1, gdsp0, gdsp1 */
>>> #define FASTRPC_MAX_SESSIONS 14
>>> #define FASTRPC_MAX_VMIDS 16
>>> #define FASTRPC_ALIGN 128
>>> @@ -107,7 +109,9 @@
>>> #define miscdev_to_fdevice(d) container_of(d, struct fastrpc_device, miscdev)
>>> static const char *domains[FASTRPC_DEV_MAX] = { "adsp", "mdsp",
>>> - "sdsp", "cdsp", "cdsp1" };
>>> + "sdsp", "cdsp",
>>> + "cdsp1", "gdsp0",
>>> + "gdsp1" };
>>> struct fastrpc_phy_page {
>>> u64 addr; /* physical address */
>>> u64 size; /* size of contiguous region */
>>> @@ -2338,6 +2342,8 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
>>> break;
>>> case CDSP_DOMAIN_ID:
>>> case CDSP1_DOMAIN_ID:
>>> + case GDSP0_DOMAIN_ID:
>>> + case GDSP1_DOMAIN_ID:
>>> data->unsigned_support = true;
>>> /* Create both device nodes so that we can allow both Signed and Unsigned PD */
>>> err = fastrpc_device_register(rdev, data, true, domains[domain_id]);
>>
>>
>> Can you try this patch: only compile tested.
>>
>> ---------------------------------->cut<---------------------------------------
>> From 3f8607557162e16673b26fa253d11cafdc4444cf Mon Sep 17 00:00:00 2001
>> From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>> Date: Thu, 20 Mar 2025 17:07:05 +0000
>> Subject: [PATCH] misc: fastrpc: cleanup the domain names
>>
>> Currently the domain ids are added for each instance of domain, this is
>> totally not scalable approch.
>>
>> Clean this mess and create domain ids for only domains not its
>> instances.
>> This patch also moves the domain ids to uapi header as this is required
>> for FASTRPC_IOCTL_GET_DSP_INFO ioctl.
>>
>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>> ---
>> drivers/misc/fastrpc.c | 45 ++++++++++++++++++++-----------------
>> include/uapi/misc/fastrpc.h | 7 ++++++
>> 2 files changed, 32 insertions(+), 20 deletions(-)
>>
>
>
>> diff --git a/include/uapi/misc/fastrpc.h b/include/uapi/misc/fastrpc.h
>> index f33d914d8f46..89516abd258f 100644
>> --- a/include/uapi/misc/fastrpc.h
>> +++ b/include/uapi/misc/fastrpc.h
>> @@ -133,6 +133,13 @@ struct fastrpc_mem_unmap {
>> __s32 reserved[5];
>> };
>>
>> +#define ADSP_DOMAIN_ID (0)
>> +#define MDSP_DOMAIN_ID (1)
>> +#define SDSP_DOMAIN_ID (2)
>> +#define CDSP_DOMAIN_ID (3)
>> +#define GDSP_DOMAIN_ID (4)
>
> Why are you adding these to uAPI? How are they going to be used by the
> userspace?
>
>> +
>> +#define FASTRPC_DOMAIN_MAX 4
>> struct fastrpc_ioctl_capability {
>> __u32 domain;
here, in domain value of fastrpc_ioctl_capability.
>> __u32 attribute_id;
>> --
>> 2.25.1
>>
>>
>> ---------------------------------->cut<---------------------------------------
>
next prev parent reply other threads:[~2025-03-24 13:29 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-20 9:14 [PATCH v2 0/3] Add support for gpdsp remoteproc on sa8775p Ling Xu
2025-03-20 9:14 ` [PATCH v2 1/3] arm64: dts: qcom: sa8775p: add GPDSP fastrpc-compute-cb nodes Ling Xu
2025-03-20 10:54 ` Dmitry Baryshkov
2025-03-20 9:14 ` [PATCH v2 2/3] misc: fastrpc: add support for gpdsp remoteproc Ling Xu
2025-03-20 9:26 ` Ekansh Gupta
2025-03-20 10:30 ` Konrad Dybcio
2025-03-20 17:11 ` Srinivas Kandagatla
2025-03-20 18:43 ` Dmitry Baryshkov
2025-03-21 12:23 ` Srinivas Kandagatla
2025-03-21 14:07 ` Dmitry Baryshkov
2025-04-02 8:38 ` Ekansh Gupta
2025-04-02 8:42 ` Dmitry Baryshkov
2025-04-03 4:44 ` Ekansh Gupta
2025-04-03 13:49 ` Srinivas Kandagatla
2025-03-21 14:07 ` Dmitry Baryshkov
2025-03-24 13:29 ` Srinivas Kandagatla [this message]
2025-03-24 16:24 ` Dmitry Baryshkov
2025-04-07 9:13 ` Ling Xu
2025-04-08 8:14 ` Srinivas Kandagatla
2025-06-16 11:28 ` Ling Xu
2025-06-16 11:32 ` Dmitry Baryshkov
2025-06-18 5:15 ` Ling Xu
2025-06-18 21:08 ` Dmitry Baryshkov
2025-03-20 9:14 ` [PATCH v2 3/3] dt-bindings: misc: qcom,fastrpc: Add GPDSPs label Ling Xu
2025-03-21 9:42 ` Krzysztof Kozlowski
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=90f2bcab-d89f-40c0-9851-7ff25f2c1eda@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=amahesh@qti.qualcomm.com \
--cc=andersson@kernel.org \
--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=gregkh@linuxfoundation.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_ekangupt@quicinc.com \
--cc=quic_kuiw@quicinc.com \
--cc=quic_lxu5@quicinc.com \
--cc=robh@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;
as well as URLs for NNTP newsgroup(s).