* [PATCH v3 0/3] Add support for gdsp remoteproc on sa8775p
@ 2025-06-22 13:38 Ling Xu
2025-06-22 13:38 ` [PATCH v3 1/3] dt-bindings: misc: qcom,fastrpc: Add GDSP label Ling Xu
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Ling Xu @ 2025-06-22 13:38 UTC (permalink / raw)
To: srini, amahesh, robh, krzk+dt, conor+dt, andersson, konradybcio,
arnd, gregkh
Cc: quic_kuiw, ekansh.gupta, devicetree, linux-arm-msm, dri-devel,
linux-kernel, Ling Xu
The fastrpc driver has support for 5 types of remoteprocs. There are
some products which support GDSP remoteprocs. GDSPs are General
Purpose DSPs where tasks can be offloaded. Add changes to support GDSP
remoteprocs and also add GDSP fastrpc nodes.
Patch [v2]: https://lore.kernel.org/linux-arm-msm/20250320091446.3647918-1-quic_lxu5@quicinc.com/
Changes in v3:
- Restrict domain IDs to represent a domain.
Changes in v2:
- Add GPDSP labels in dt-bindings.
Ling Xu (3):
dt-bindings: misc: qcom,fastrpc: Add GDSP label
arm64: dts: qcom: sa8775p: add GDSP fastrpc-compute-cb nodes
misc: fastrpc: add support for gdsp remoteproc
.../bindings/misc/qcom,fastrpc.yaml | 2 +
arch/arm64/boot/dts/qcom/sa8775p.dtsi | 57 +++++++++++++++++++
drivers/misc/fastrpc.c | 57 ++++++++-----------
include/uapi/misc/fastrpc.h | 11 +++-
4 files changed, 92 insertions(+), 35 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 1/3] dt-bindings: misc: qcom,fastrpc: Add GDSP label
2025-06-22 13:38 [PATCH v3 0/3] Add support for gdsp remoteproc on sa8775p Ling Xu
@ 2025-06-22 13:38 ` Ling Xu
2025-06-25 7:44 ` Krzysztof Kozlowski
2025-06-22 13:38 ` [PATCH v3 2/3] arm64: dts: qcom: sa8775p: add GDSP fastrpc-compute-cb nodes Ling Xu
2025-06-22 13:38 ` [PATCH v3 3/3] misc: fastrpc: add support for gdsp remoteproc Ling Xu
2 siblings, 1 reply; 11+ messages in thread
From: Ling Xu @ 2025-06-22 13:38 UTC (permalink / raw)
To: srini, amahesh, robh, krzk+dt, conor+dt, andersson, konradybcio,
arnd, gregkh
Cc: quic_kuiw, ekansh.gupta, devicetree, linux-arm-msm, dri-devel,
linux-kernel, Ling Xu
Add "gdsp" as the new supported label for GDSP fastrpc domain.
Signed-off-by: Ling Xu <quic_lxu5@quicinc.com>
---
Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml b/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml
index 0840a3d92513..3f6199fc9ae6 100644
--- a/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml
+++ b/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml
@@ -27,6 +27,8 @@ properties:
- sdsp
- cdsp
- cdsp1
+ - gdsp0
+ - gdsp1
memory-region:
maxItems: 1
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v3 2/3] arm64: dts: qcom: sa8775p: add GDSP fastrpc-compute-cb nodes
2025-06-22 13:38 [PATCH v3 0/3] Add support for gdsp remoteproc on sa8775p Ling Xu
2025-06-22 13:38 ` [PATCH v3 1/3] dt-bindings: misc: qcom,fastrpc: Add GDSP label Ling Xu
@ 2025-06-22 13:38 ` Ling Xu
2025-06-22 13:38 ` [PATCH v3 3/3] misc: fastrpc: add support for gdsp remoteproc Ling Xu
2 siblings, 0 replies; 11+ messages in thread
From: Ling Xu @ 2025-06-22 13:38 UTC (permalink / raw)
To: srini, amahesh, robh, krzk+dt, conor+dt, andersson, konradybcio,
arnd, gregkh
Cc: quic_kuiw, ekansh.gupta, devicetree, linux-arm-msm, dri-devel,
linux-kernel, Ling Xu, Dmitry Baryshkov
Add GDSP0 and GDSP1 fastrpc compute-cb nodes for sa8775p SoC.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Ling Xu <quic_lxu5@quicinc.com>
---
arch/arm64/boot/dts/qcom/sa8775p.dtsi | 57 +++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
index 45f536633f64..f69fb1d05a0d 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi
+++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
@@ -5605,6 +5605,34 @@ IPCC_MPROC_SIGNAL_GLINK_QMP
label = "gpdsp0";
qcom,remote-pid = <17>;
+
+ fastrpc {
+ compatible = "qcom,fastrpc";
+ qcom,glink-channels = "fastrpcglink-apps-dsp";
+ label = "gdsp0";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ compute-cb@1 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <1>;
+ iommus = <&apps_smmu 0x38a1 0x0>;
+ dma-coherent;
+ };
+
+ compute-cb@2 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <2>;
+ iommus = <&apps_smmu 0x38a2 0x0>;
+ dma-coherent;
+ };
+ compute-cb@3 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <3>;
+ iommus = <&apps_smmu 0x38a3 0x0>;
+ dma-coherent;
+ };
+ };
};
};
@@ -5648,6 +5676,35 @@ IPCC_MPROC_SIGNAL_GLINK_QMP
label = "gpdsp1";
qcom,remote-pid = <18>;
+
+ fastrpc {
+ compatible = "qcom,fastrpc";
+ qcom,glink-channels = "fastrpcglink-apps-dsp";
+ label = "gdsp1";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ compute-cb@1 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <1>;
+ iommus = <&apps_smmu 0x38c1 0x0>;
+ dma-coherent;
+ };
+
+ compute-cb@2 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <2>;
+ iommus = <&apps_smmu 0x38c2 0x0>;
+ dma-coherent;
+ };
+
+ compute-cb@3 {
+ compatible = "qcom,fastrpc-compute-cb";
+ reg = <3>;
+ iommus = <&apps_smmu 0x38c3 0x0>;
+ dma-coherent;
+ };
+ };
};
};
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v3 3/3] misc: fastrpc: add support for gdsp remoteproc
2025-06-22 13:38 [PATCH v3 0/3] Add support for gdsp remoteproc on sa8775p Ling Xu
2025-06-22 13:38 ` [PATCH v3 1/3] dt-bindings: misc: qcom,fastrpc: Add GDSP label Ling Xu
2025-06-22 13:38 ` [PATCH v3 2/3] arm64: dts: qcom: sa8775p: add GDSP fastrpc-compute-cb nodes Ling Xu
@ 2025-06-22 13:38 ` Ling Xu
2025-06-23 10:28 ` Konrad Dybcio
2025-06-24 2:37 ` Dmitry Baryshkov
2 siblings, 2 replies; 11+ messages in thread
From: Ling Xu @ 2025-06-22 13:38 UTC (permalink / raw)
To: srini, amahesh, robh, krzk+dt, conor+dt, andersson, konradybcio,
arnd, gregkh
Cc: quic_kuiw, ekansh.gupta, devicetree, linux-arm-msm, dri-devel,
linux-kernel, Ling Xu
The fastrpc driver has support for 5 types of remoteprocs. There are
some products which support GDSP remoteprocs. Add changes to support
GDSP remoteprocs.
Signed-off-by: Ling Xu <quic_lxu5@quicinc.com>
---
drivers/misc/fastrpc.c | 57 ++++++++++++++++---------------------
include/uapi/misc/fastrpc.h | 11 +++++--
2 files changed, 33 insertions(+), 35 deletions(-)
diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c
index 378923594f02..cd3063bc64f2 100644
--- a/drivers/misc/fastrpc.c
+++ b/drivers/misc/fastrpc.c
@@ -23,12 +23,6 @@
#include <uapi/misc/fastrpc.h>
#include <linux/of_reserved_mem.h>
-#define ADSP_DOMAIN_ID (0)
-#define MDSP_DOMAIN_ID (1)
-#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 FASTRPC_MAX_SESSIONS 14
#define FASTRPC_MAX_VMIDS 16
#define FASTRPC_ALIGN 128
@@ -106,8 +100,6 @@
#define miscdev_to_fdevice(d) container_of(d, struct fastrpc_device, miscdev)
-static const char *domains[FASTRPC_DEV_MAX] = { "adsp", "mdsp",
- "sdsp", "cdsp", "cdsp1" };
struct fastrpc_phy_page {
u64 addr; /* physical address */
u64 size; /* size of contiguous region */
@@ -1723,7 +1715,6 @@ static int fastrpc_get_info_from_kernel(struct fastrpc_ioctl_capability *cap,
uint32_t attribute_id = cap->attribute_id;
uint32_t *dsp_attributes;
unsigned long flags;
- uint32_t domain = cap->domain;
int err;
spin_lock_irqsave(&cctx->lock, flags);
@@ -1741,7 +1732,7 @@ static int fastrpc_get_info_from_kernel(struct fastrpc_ioctl_capability *cap,
err = fastrpc_get_info_from_dsp(fl, dsp_attributes, FASTRPC_MAX_DSP_ATTRIBUTES);
if (err == DSP_UNSUPPORTED_API) {
dev_info(&cctx->rpdev->dev,
- "Warning: DSP capabilities not supported on domain: %d\n", domain);
+ "Warning: DSP capabilities not supported\n");
kfree(dsp_attributes);
return -EOPNOTSUPP;
} else if (err) {
@@ -1769,17 +1760,6 @@ static int fastrpc_get_dsp_info(struct fastrpc_user *fl, char __user *argp)
return -EFAULT;
cap.capability = 0;
- if (cap.domain >= FASTRPC_DEV_MAX) {
- dev_err(&fl->cctx->rpdev->dev, "Error: Invalid domain id:%d, err:%d\n",
- cap.domain, err);
- return -ECHRNG;
- }
-
- /* Fastrpc Capablities does not support modem domain */
- if (cap.domain == MDSP_DOMAIN_ID) {
- dev_err(&fl->cctx->rpdev->dev, "Error: modem not supported %d\n", err);
- return -ECHRNG;
- }
if (cap.attribute_id >= FASTRPC_MAX_DSP_ATTRIBUTES) {
dev_err(&fl->cctx->rpdev->dev, "Error: invalid attribute: %d, err: %d\n",
@@ -2255,6 +2235,22 @@ static int fastrpc_device_register(struct device *dev, struct fastrpc_channel_ct
return err;
}
+static int fastrpc_get_domain_id(const char *domain)
+{
+ if (strncmp(domain, "adsp", 4) == 0)
+ return ADSP_DOMAIN_ID;
+ else if (strncmp(domain, "cdsp", 4) == 0)
+ return CDSP_DOMAIN_ID;
+ else if (strncmp(domain, "mdsp", 4) == 0)
+ return MDSP_DOMAIN_ID;
+ else if (strncmp(domain, "sdsp", 4) == 0)
+ return SDSP_DOMAIN_ID;
+ else if (strncmp(domain, "gdsp", 4) == 0)
+ return GDSP_DOMAIN_ID;
+
+ return -EINVAL;
+}
+
static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
{
struct device *rdev = &rpdev->dev;
@@ -2272,15 +2268,10 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
return err;
}
- for (i = 0; i < FASTRPC_DEV_MAX; i++) {
- if (!strcmp(domains[i], domain)) {
- domain_id = i;
- break;
- }
- }
+ domain_id = fastrpc_get_domain_id(domain);
if (domain_id < 0) {
- dev_info(rdev, "FastRPC Invalid Domain ID %d\n", domain_id);
+ dev_info(rdev, "FastRPC Domain %s not supported\n", domain);
return -EINVAL;
}
@@ -2330,21 +2321,21 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
case ADSP_DOMAIN_ID:
case MDSP_DOMAIN_ID:
case SDSP_DOMAIN_ID:
- /* Unsigned PD offloading is only supported on CDSP and CDSP1 */
+ /* Unsigned PD offloading is only supported on CDSP and GDSP */
data->unsigned_support = false;
- err = fastrpc_device_register(rdev, data, secure_dsp, domains[domain_id]);
+ err = fastrpc_device_register(rdev, data, secure_dsp, domain);
if (err)
goto err_free_data;
break;
case CDSP_DOMAIN_ID:
- case CDSP1_DOMAIN_ID:
+ case GDSP_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]);
+ err = fastrpc_device_register(rdev, data, true, domain);
if (err)
goto err_free_data;
- err = fastrpc_device_register(rdev, data, false, domains[domain_id]);
+ err = fastrpc_device_register(rdev, data, false, domain);
if (err)
goto err_deregister_fdev;
break;
diff --git a/include/uapi/misc/fastrpc.h b/include/uapi/misc/fastrpc.h
index f33d914d8f46..ebef9ddcd184 100644
--- a/include/uapi/misc/fastrpc.h
+++ b/include/uapi/misc/fastrpc.h
@@ -18,6 +18,14 @@
#define FASTRPC_IOCTL_MEM_UNMAP _IOWR('R', 11, struct fastrpc_mem_unmap)
#define FASTRPC_IOCTL_GET_DSP_INFO _IOWR('R', 13, struct fastrpc_ioctl_capability)
+#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)
+
+#define FASTRPC_DOMAIN_MAX 4
+
/**
* enum fastrpc_map_flags - control flags for mapping memory on DSP user process
* @FASTRPC_MAP_STATIC: Map memory pages with RW- permission and CACHE WRITEBACK.
@@ -134,10 +142,9 @@ struct fastrpc_mem_unmap {
};
struct fastrpc_ioctl_capability {
- __u32 domain;
__u32 attribute_id;
__u32 capability; /* dsp capability */
- __u32 reserved[4];
+ __u32 reserved[5];
};
#endif /* __QCOM_FASTRPC_H__ */
--
2.34.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v3 3/3] misc: fastrpc: add support for gdsp remoteproc
2025-06-22 13:38 ` [PATCH v3 3/3] misc: fastrpc: add support for gdsp remoteproc Ling Xu
@ 2025-06-23 10:28 ` Konrad Dybcio
2025-06-24 5:58 ` Ling Xu
2025-06-24 2:37 ` Dmitry Baryshkov
1 sibling, 1 reply; 11+ messages in thread
From: Konrad Dybcio @ 2025-06-23 10:28 UTC (permalink / raw)
To: Ling Xu, srini, amahesh, robh, krzk+dt, conor+dt, andersson,
konradybcio, arnd, gregkh
Cc: quic_kuiw, ekansh.gupta, devicetree, linux-arm-msm, dri-devel,
linux-kernel
On 6/22/25 3:38 PM, Ling Xu wrote:
> The fastrpc driver has support for 5 types of remoteprocs. There are
> some products which support GDSP remoteprocs. Add changes to support
> GDSP remoteprocs.
Commit messages saying "add changes to support xyz" often indicate
the problem or the non-obvious solution is not properly described
(which is the case here as well)
[...]
> +static int fastrpc_get_domain_id(const char *domain)
> +{
> + if (strncmp(domain, "adsp", 4) == 0)
if (!strncmp(...)) is the common syntax, although it's obviously
not functionally different
> + return ADSP_DOMAIN_ID;
> + else if (strncmp(domain, "cdsp", 4) == 0)
> + return CDSP_DOMAIN_ID;
> + else if (strncmp(domain, "mdsp", 4) == 0)
> + return MDSP_DOMAIN_ID;
> + else if (strncmp(domain, "sdsp", 4) == 0)
> + return SDSP_DOMAIN_ID;
> + else if (strncmp(domain, "gdsp", 4) == 0)
> + return GDSP_DOMAIN_ID;
FWIW, other places call it G*P*DSP
[...]
> --- a/include/uapi/misc/fastrpc.h
> +++ b/include/uapi/misc/fastrpc.h
> @@ -18,6 +18,14 @@
> #define FASTRPC_IOCTL_MEM_UNMAP _IOWR('R', 11, struct fastrpc_mem_unmap)
> #define FASTRPC_IOCTL_GET_DSP_INFO _IOWR('R', 13, struct fastrpc_ioctl_capability)
>
> +#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)
> +
> +#define FASTRPC_DOMAIN_MAX 4
What are these used for now?
> /**
> * enum fastrpc_map_flags - control flags for mapping memory on DSP user process
> * @FASTRPC_MAP_STATIC: Map memory pages with RW- permission and CACHE WRITEBACK.
> @@ -134,10 +142,9 @@ struct fastrpc_mem_unmap {
> };
>
> struct fastrpc_ioctl_capability {
> - __u32 domain;
> __u32 attribute_id;
> __u32 capability; /* dsp capability */
> - __u32 reserved[4];
> + __u32 reserved[5];
This is an ABI break, as the data within structs is well, structured
Konrad
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 3/3] misc: fastrpc: add support for gdsp remoteproc
2025-06-22 13:38 ` [PATCH v3 3/3] misc: fastrpc: add support for gdsp remoteproc Ling Xu
2025-06-23 10:28 ` Konrad Dybcio
@ 2025-06-24 2:37 ` Dmitry Baryshkov
2025-06-24 5:59 ` Ling Xu
1 sibling, 1 reply; 11+ messages in thread
From: Dmitry Baryshkov @ 2025-06-24 2:37 UTC (permalink / raw)
To: Ling Xu
Cc: srini, amahesh, robh, krzk+dt, conor+dt, andersson, konradybcio,
arnd, gregkh, quic_kuiw, ekansh.gupta, devicetree, linux-arm-msm,
dri-devel, linux-kernel
On Sun, Jun 22, 2025 at 07:08:20PM +0530, Ling Xu wrote:
> The fastrpc driver has support for 5 types of remoteprocs. There are
> some products which support GDSP remoteprocs. Add changes to support
> GDSP remoteprocs.
Please don't mix code refactoring with adding new features. Split this
patch accordingly.
>
> Signed-off-by: Ling Xu <quic_lxu5@quicinc.com>
> ---
> drivers/misc/fastrpc.c | 57 ++++++++++++++++---------------------
> include/uapi/misc/fastrpc.h | 11 +++++--
> 2 files changed, 33 insertions(+), 35 deletions(-)
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 3/3] misc: fastrpc: add support for gdsp remoteproc
2025-06-23 10:28 ` Konrad Dybcio
@ 2025-06-24 5:58 ` Ling Xu
2025-06-28 5:51 ` Dmitry Baryshkov
0 siblings, 1 reply; 11+ messages in thread
From: Ling Xu @ 2025-06-24 5:58 UTC (permalink / raw)
To: Konrad Dybcio, srini, amahesh, robh, krzk+dt, conor+dt, andersson,
konradybcio, arnd, gregkh
Cc: quic_kuiw, ekansh.gupta, devicetree, linux-arm-msm, dri-devel,
linux-kernel
在 6/23/2025 6:28 PM, Konrad Dybcio 写道:
> On 6/22/25 3:38 PM, Ling Xu wrote:
>> The fastrpc driver has support for 5 types of remoteprocs. There are
>> some products which support GDSP remoteprocs. Add changes to support
>> GDSP remoteprocs.
>
> Commit messages saying "add changes to support xyz" often indicate
> the problem or the non-obvious solution is not properly described
> (which is the case here as well)
>
> [...]
>
Okay, I will change to
"Add related domain IDS to support GDSP remoteprocs."
>> +static int fastrpc_get_domain_id(const char *domain)
>> +{
>> + if (strncmp(domain, "adsp", 4) == 0)
>
> if (!strncmp(...)) is the common syntax, although it's obviously
> not functionally different
>
>> + return ADSP_DOMAIN_ID;
>> + else if (strncmp(domain, "cdsp", 4) == 0)
>> + return CDSP_DOMAIN_ID;
>> + else if (strncmp(domain, "mdsp", 4) == 0)
>> + return MDSP_DOMAIN_ID;
>> + else if (strncmp(domain, "sdsp", 4) == 0)
>> + return SDSP_DOMAIN_ID;
>> + else if (strncmp(domain, "gdsp", 4) == 0)
>> + return GDSP_DOMAIN_ID;
>
> FWIW, other places call it G*P*DSP
>
In fastrpc, we call it GDSP to match dsp side.
because in device,the related path for gdsp images are gdsp and gdsp0.
> [...]
>
>> --- a/include/uapi/misc/fastrpc.h
>> +++ b/include/uapi/misc/fastrpc.h
>> @@ -18,6 +18,14 @@
>> #define FASTRPC_IOCTL_MEM_UNMAP _IOWR('R', 11, struct fastrpc_mem_unmap)
>> #define FASTRPC_IOCTL_GET_DSP_INFO _IOWR('R', 13, struct fastrpc_ioctl_capability)
>>
>> +#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)
>> +
>> +#define FASTRPC_DOMAIN_MAX 4
>
> What are these used for now?
>
To get proper domain IDs for fastrpc_rpmsg_probe etc.
>> /**
>> * enum fastrpc_map_flags - control flags for mapping memory on DSP user process
>> * @FASTRPC_MAP_STATIC: Map memory pages with RW- permission and CACHE WRITEBACK.
>> @@ -134,10 +142,9 @@ struct fastrpc_mem_unmap {
>> };
>>
>> struct fastrpc_ioctl_capability {
>> - __u32 domain;
>> __u32 attribute_id;
>> __u32 capability; /* dsp capability */
>> - __u32 reserved[4];
>> + __u32 reserved[5];
>
> This is an ABI break, as the data within structs is well, structured
this is suggested by Dmitry, I will have a discussion internally.
>
> Konrad
--
Thx and BRs,
Ling Xu
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 3/3] misc: fastrpc: add support for gdsp remoteproc
2025-06-24 2:37 ` Dmitry Baryshkov
@ 2025-06-24 5:59 ` Ling Xu
0 siblings, 0 replies; 11+ messages in thread
From: Ling Xu @ 2025-06-24 5:59 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: srini, amahesh, robh, krzk+dt, conor+dt, andersson, konradybcio,
arnd, gregkh, quic_kuiw, ekansh.gupta, devicetree, linux-arm-msm,
dri-devel, linux-kernel
在 6/24/2025 10:37 AM, Dmitry Baryshkov 写道:
> On Sun, Jun 22, 2025 at 07:08:20PM +0530, Ling Xu wrote:
>> The fastrpc driver has support for 5 types of remoteprocs. There are
>> some products which support GDSP remoteprocs. Add changes to support
>> GDSP remoteprocs.
>
> Please don't mix code refactoring with adding new features. Split this
> patch accordingly.
>
Okay, thanks for review.
I will update in next version.
>>
>> Signed-off-by: Ling Xu <quic_lxu5@quicinc.com>
>> ---
>> drivers/misc/fastrpc.c | 57 ++++++++++++++++---------------------
>> include/uapi/misc/fastrpc.h | 11 +++++--
>> 2 files changed, 33 insertions(+), 35 deletions(-)
>>
>
--
Thx and BRs,
Ling Xu
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 1/3] dt-bindings: misc: qcom,fastrpc: Add GDSP label
2025-06-22 13:38 ` [PATCH v3 1/3] dt-bindings: misc: qcom,fastrpc: Add GDSP label Ling Xu
@ 2025-06-25 7:44 ` Krzysztof Kozlowski
2025-06-27 10:15 ` Ling Xu
0 siblings, 1 reply; 11+ messages in thread
From: Krzysztof Kozlowski @ 2025-06-25 7:44 UTC (permalink / raw)
To: Ling Xu
Cc: srini, amahesh, robh, krzk+dt, conor+dt, andersson, konradybcio,
arnd, gregkh, quic_kuiw, ekansh.gupta, devicetree, linux-arm-msm,
dri-devel, linux-kernel
On Sun, Jun 22, 2025 at 07:08:18PM +0530, Ling Xu wrote:
> Add "gdsp" as the new supported label for GDSP fastrpc domain.
Neither this commit, nor second nor third explain what is GDSP...
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 1/3] dt-bindings: misc: qcom,fastrpc: Add GDSP label
2025-06-25 7:44 ` Krzysztof Kozlowski
@ 2025-06-27 10:15 ` Ling Xu
0 siblings, 0 replies; 11+ messages in thread
From: Ling Xu @ 2025-06-27 10:15 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: srini, amahesh, robh, krzk+dt, conor+dt, andersson, konradybcio,
arnd, gregkh, quic_kuiw, ekansh.gupta, devicetree, linux-arm-msm,
dri-devel, linux-kernel
在 6/25/2025 3:44 PM, Krzysztof Kozlowski 写道:
> On Sun, Jun 22, 2025 at 07:08:18PM +0530, Ling Xu wrote:
>> Add "gdsp" as the new supported label for GDSP fastrpc domain.
>
> Neither this commit, nor second nor third explain what is GDSP...
>
> Best regards,
> Krzysztof
> Okay, I will edit commit message in next patch.
GDSP is General Purpose DSP where tasks can be offloaded, and it includes GDSP0 and GDSP1.
Analogous to CDSP (Compute DSP) which includes CDSP0 and CDSP1.
--
Thx and BRs,
Ling Xu
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 3/3] misc: fastrpc: add support for gdsp remoteproc
2025-06-24 5:58 ` Ling Xu
@ 2025-06-28 5:51 ` Dmitry Baryshkov
0 siblings, 0 replies; 11+ messages in thread
From: Dmitry Baryshkov @ 2025-06-28 5:51 UTC (permalink / raw)
To: Ling Xu
Cc: Konrad Dybcio, srini, amahesh, robh, krzk+dt, conor+dt, andersson,
konradybcio, arnd, gregkh, quic_kuiw, ekansh.gupta, devicetree,
linux-arm-msm, dri-devel, linux-kernel
On Tue, Jun 24, 2025 at 01:58:47PM +0800, Ling Xu wrote:
> 在 6/23/2025 6:28 PM, Konrad Dybcio 写道:
> > On 6/22/25 3:38 PM, Ling Xu wrote:
> >> The fastrpc driver has support for 5 types of remoteprocs. There are
> >> some products which support GDSP remoteprocs. Add changes to support
> >> GDSP remoteprocs.
> >
> > Commit messages saying "add changes to support xyz" often indicate
> > the problem or the non-obvious solution is not properly described
> > (which is the case here as well)
> >
> > [...]
> >
>
> Okay, I will change to
> "Add related domain IDS to support GDSP remoteprocs."
>
> >> +static int fastrpc_get_domain_id(const char *domain)
> >> +{
> >> + if (strncmp(domain, "adsp", 4) == 0)
> >
> > if (!strncmp(...)) is the common syntax, although it's obviously
> > not functionally different
> >
> >> + return ADSP_DOMAIN_ID;
> >> + else if (strncmp(domain, "cdsp", 4) == 0)
> >> + return CDSP_DOMAIN_ID;
> >> + else if (strncmp(domain, "mdsp", 4) == 0)
> >> + return MDSP_DOMAIN_ID;
> >> + else if (strncmp(domain, "sdsp", 4) == 0)
> >> + return SDSP_DOMAIN_ID;
> >> + else if (strncmp(domain, "gdsp", 4) == 0)
> >> + return GDSP_DOMAIN_ID;
> >
> > FWIW, other places call it G*P*DSP
> >
> In fastrpc, we call it GDSP to match dsp side.
> because in device,the related path for gdsp images are gdsp and gdsp0.
> > [...]
> >
> >> --- a/include/uapi/misc/fastrpc.h
> >> +++ b/include/uapi/misc/fastrpc.h
> >> @@ -18,6 +18,14 @@
> >> #define FASTRPC_IOCTL_MEM_UNMAP _IOWR('R', 11, struct fastrpc_mem_unmap)
> >> #define FASTRPC_IOCTL_GET_DSP_INFO _IOWR('R', 13, struct fastrpc_ioctl_capability)
> >>
> >> +#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)
> >> +
> >> +#define FASTRPC_DOMAIN_MAX 4
> >
> > What are these used for now?
> >
> To get proper domain IDs for fastrpc_rpmsg_probe etc.
These seem to be driver-internal, so they don't need to be exposed to
userspace.
> >> /**
> >> * enum fastrpc_map_flags - control flags for mapping memory on DSP user process
> >> * @FASTRPC_MAP_STATIC: Map memory pages with RW- permission and CACHE WRITEBACK.
> >> @@ -134,10 +142,9 @@ struct fastrpc_mem_unmap {
> >> };
> >>
> >> struct fastrpc_ioctl_capability {
> >> - __u32 domain;
> >> __u32 attribute_id;
> >> __u32 capability; /* dsp capability */
> >> - __u32 reserved[4];
> >> + __u32 reserved[5];
> >
> > This is an ABI break, as the data within structs is well, structured
>
> this is suggested by Dmitry, I will have a discussion internally.
No, I didn't suggest to break the ABI. I suggested making the domain
field reserved.
> >
> > Konrad
>
> --
> Thx and BRs,
> Ling Xu
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2025-06-28 5:51 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-22 13:38 [PATCH v3 0/3] Add support for gdsp remoteproc on sa8775p Ling Xu
2025-06-22 13:38 ` [PATCH v3 1/3] dt-bindings: misc: qcom,fastrpc: Add GDSP label Ling Xu
2025-06-25 7:44 ` Krzysztof Kozlowski
2025-06-27 10:15 ` Ling Xu
2025-06-22 13:38 ` [PATCH v3 2/3] arm64: dts: qcom: sa8775p: add GDSP fastrpc-compute-cb nodes Ling Xu
2025-06-22 13:38 ` [PATCH v3 3/3] misc: fastrpc: add support for gdsp remoteproc Ling Xu
2025-06-23 10:28 ` Konrad Dybcio
2025-06-24 5:58 ` Ling Xu
2025-06-28 5:51 ` Dmitry Baryshkov
2025-06-24 2:37 ` Dmitry Baryshkov
2025-06-24 5:59 ` Ling Xu
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).