[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <90f2bcab-d89f-40c0-9851-7ff25f2c1eda@linaro.org>
Date: Mon, 24 Mar 2025 13:29:30 +0000
From: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
Cc: Ling Xu <quic_lxu5@...cinc.com>, andersson@...nel.org,
konradybcio@...nel.org, robh@...nel.org, krzk+dt@...nel.org,
conor+dt@...nel.org, amahesh@....qualcomm.com, arnd@...db.de,
gregkh@...uxfoundation.org, quic_kuiw@...cinc.com,
quic_ekangupt@...cinc.com, linux-arm-msm@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH v2 2/3] misc: fastrpc: add support for gpdsp remoteproc
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@....qualcomm.com>
>>> Signed-off-by: Ling Xu <quic_lxu5@...cinc.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@...aro.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@...aro.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<---------------------------------------
>
Powered by blists - more mailing lists