* [PATCH 0/2] qcom_q6v5_pas fixes for msm8226
@ 2025-01-28 21:53 Luca Weiss
2025-01-28 21:53 ` [PATCH 1/2] remoteproc: qcom_q6v5_pas: Use resource with CX PD for MSM8226 Luca Weiss
2025-01-28 21:54 ` [PATCH 2/2] remoteproc: qcom_q6v5_pas: Make single-PD handling more robust Luca Weiss
0 siblings, 2 replies; 5+ messages in thread
From: Luca Weiss @ 2025-01-28 21:53 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Sibi Sankar, Stephan Gerhold
Cc: linux-arm-msm, linux-remoteproc, linux-kernel, Luca Weiss
During msm8226 mss bringup it was noticed that the adsp on that SoC is
not behaving quite correctly. Correct that and add a patch that improves
the single-power-domain handling in the pas driver.
Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
---
Luca Weiss (2):
remoteproc: qcom_q6v5_pas: Use resource with CX PD for MSM8226
remoteproc: qcom_q6v5_pas: Make single-PD handling more robust
drivers/remoteproc/qcom_q6v5_pas.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
---
base-commit: 0b58e108042b0ed28a71cd7edf5175999955b233
change-id: 20250128-pas-singlepd-469aa7ee2ca8
Best regards,
--
Luca Weiss <luca@lucaweiss.eu>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] remoteproc: qcom_q6v5_pas: Use resource with CX PD for MSM8226
2025-01-28 21:53 [PATCH 0/2] qcom_q6v5_pas fixes for msm8226 Luca Weiss
@ 2025-01-28 21:53 ` Luca Weiss
2025-01-29 8:17 ` Stephan Gerhold
2025-01-28 21:54 ` [PATCH 2/2] remoteproc: qcom_q6v5_pas: Make single-PD handling more robust Luca Weiss
1 sibling, 1 reply; 5+ messages in thread
From: Luca Weiss @ 2025-01-28 21:53 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Sibi Sankar, Stephan Gerhold
Cc: linux-arm-msm, linux-remoteproc, linux-kernel, Luca Weiss
MSM8226 requires the CX power domain, so use the msm8996_adsp_resource
which has cx under proxy_pd_names and is otherwise equivalent.
Suggested-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Fixes: fb4f07cc9399 ("remoteproc: qcom: pas: Add MSM8226 ADSP support")
Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
---
drivers/remoteproc/qcom_q6v5_pas.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
index 88e7b84f223c0222a01e2a246a848f2889ac00b3..aca44bb6522f00cb525c4b816040445287444434 100644
--- a/drivers/remoteproc/qcom_q6v5_pas.c
+++ b/drivers/remoteproc/qcom_q6v5_pas.c
@@ -1319,7 +1319,7 @@ static const struct adsp_data sm8650_mpss_resource = {
};
static const struct of_device_id adsp_of_match[] = {
- { .compatible = "qcom,msm8226-adsp-pil", .data = &adsp_resource_init},
+ { .compatible = "qcom,msm8226-adsp-pil", .data = &msm8996_adsp_resource},
{ .compatible = "qcom,msm8953-adsp-pil", .data = &msm8996_adsp_resource},
{ .compatible = "qcom,msm8974-adsp-pil", .data = &adsp_resource_init},
{ .compatible = "qcom,msm8996-adsp-pil", .data = &msm8996_adsp_resource},
--
2.48.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] remoteproc: qcom_q6v5_pas: Make single-PD handling more robust
2025-01-28 21:53 [PATCH 0/2] qcom_q6v5_pas fixes for msm8226 Luca Weiss
2025-01-28 21:53 ` [PATCH 1/2] remoteproc: qcom_q6v5_pas: Use resource with CX PD for MSM8226 Luca Weiss
@ 2025-01-28 21:54 ` Luca Weiss
2025-01-29 8:18 ` Stephan Gerhold
1 sibling, 1 reply; 5+ messages in thread
From: Luca Weiss @ 2025-01-28 21:54 UTC (permalink / raw)
To: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Sibi Sankar, Stephan Gerhold
Cc: linux-arm-msm, linux-remoteproc, linux-kernel, Luca Weiss
Only go into the if condition for single-PD handling when there's
actually just one power domain specified there. Otherwise it'll be an
issue in the dts and we should fail in the regular code path.
This also mirrors the latest changes in the qcom_q6v5_mss driver.
Suggested-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Fixes: 17ee2fb4e856 ("remoteproc: qcom: pas: Vote for active/proxy power domains")
Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
---
drivers/remoteproc/qcom_q6v5_pas.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
index aca44bb6522f00cb525c4b816040445287444434..c1e9bbae61770ccad3e22d132a411bc6ced7180f 100644
--- a/drivers/remoteproc/qcom_q6v5_pas.c
+++ b/drivers/remoteproc/qcom_q6v5_pas.c
@@ -509,16 +509,16 @@ static int adsp_pds_attach(struct device *dev, struct device **devs,
if (!pd_names)
return 0;
+ while (pd_names[num_pds])
+ num_pds++;
+
/* Handle single power domain */
- if (dev->pm_domain) {
+ if (num_pds == 1 && dev->pm_domain) {
devs[0] = dev;
pm_runtime_enable(dev);
return 1;
}
- while (pd_names[num_pds])
- num_pds++;
-
for (i = 0; i < num_pds; i++) {
devs[i] = dev_pm_domain_attach_by_name(dev, pd_names[i]);
if (IS_ERR_OR_NULL(devs[i])) {
@@ -543,7 +543,7 @@ static void adsp_pds_detach(struct qcom_adsp *adsp, struct device **pds,
int i;
/* Handle single power domain */
- if (dev->pm_domain && pd_count) {
+ if (pd_count == 1 && dev->pm_domain) {
pm_runtime_disable(dev);
return;
}
--
2.48.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] remoteproc: qcom_q6v5_pas: Use resource with CX PD for MSM8226
2025-01-28 21:53 ` [PATCH 1/2] remoteproc: qcom_q6v5_pas: Use resource with CX PD for MSM8226 Luca Weiss
@ 2025-01-29 8:17 ` Stephan Gerhold
0 siblings, 0 replies; 5+ messages in thread
From: Stephan Gerhold @ 2025-01-29 8:17 UTC (permalink / raw)
To: Luca Weiss
Cc: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Sibi Sankar, linux-arm-msm, linux-remoteproc,
linux-kernel
On Tue, Jan 28, 2025 at 10:53:59PM +0100, Luca Weiss wrote:
> MSM8226 requires the CX power domain, so use the msm8996_adsp_resource
> which has cx under proxy_pd_names and is otherwise equivalent.
>
> Suggested-by: Stephan Gerhold <stephan.gerhold@linaro.org>
> Fixes: fb4f07cc9399 ("remoteproc: qcom: pas: Add MSM8226 ADSP support")
> Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
Not sure if Reviewed-by makes sense if I already did Suggested-by, but
anyway:
Reviewed-by: Stephan Gerhold <stephan.gerhold@linaro.org>
> ---
> drivers/remoteproc/qcom_q6v5_pas.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
> index 88e7b84f223c0222a01e2a246a848f2889ac00b3..aca44bb6522f00cb525c4b816040445287444434 100644
> --- a/drivers/remoteproc/qcom_q6v5_pas.c
> +++ b/drivers/remoteproc/qcom_q6v5_pas.c
> @@ -1319,7 +1319,7 @@ static const struct adsp_data sm8650_mpss_resource = {
> };
>
> static const struct of_device_id adsp_of_match[] = {
> - { .compatible = "qcom,msm8226-adsp-pil", .data = &adsp_resource_init},
> + { .compatible = "qcom,msm8226-adsp-pil", .data = &msm8996_adsp_resource},
> { .compatible = "qcom,msm8953-adsp-pil", .data = &msm8996_adsp_resource},
> { .compatible = "qcom,msm8974-adsp-pil", .data = &adsp_resource_init},
> { .compatible = "qcom,msm8996-adsp-pil", .data = &msm8996_adsp_resource},
>
> --
> 2.48.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] remoteproc: qcom_q6v5_pas: Make single-PD handling more robust
2025-01-28 21:54 ` [PATCH 2/2] remoteproc: qcom_q6v5_pas: Make single-PD handling more robust Luca Weiss
@ 2025-01-29 8:18 ` Stephan Gerhold
0 siblings, 0 replies; 5+ messages in thread
From: Stephan Gerhold @ 2025-01-29 8:18 UTC (permalink / raw)
To: Luca Weiss
Cc: ~postmarketos/upstreaming, phone-devel, Bjorn Andersson,
Mathieu Poirier, Sibi Sankar, linux-arm-msm, linux-remoteproc,
linux-kernel
On Tue, Jan 28, 2025 at 10:54:00PM +0100, Luca Weiss wrote:
> Only go into the if condition for single-PD handling when there's
> actually just one power domain specified there. Otherwise it'll be an
> issue in the dts and we should fail in the regular code path.
>
> This also mirrors the latest changes in the qcom_q6v5_mss driver.
>
> Suggested-by: Stephan Gerhold <stephan.gerhold@linaro.org>
> Fixes: 17ee2fb4e856 ("remoteproc: qcom: pas: Vote for active/proxy power domains")
> Signed-off-by: Luca Weiss <luca@lucaweiss.eu>
Not sure if Reviewed-by makes sense if I already did Suggested-by, but
anyway:
Reviewed-by: Stephan Gerhold <stephan.gerhold@linaro.org>
Thanks for making these fixes!
> ---
> drivers/remoteproc/qcom_q6v5_pas.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
> index aca44bb6522f00cb525c4b816040445287444434..c1e9bbae61770ccad3e22d132a411bc6ced7180f 100644
> --- a/drivers/remoteproc/qcom_q6v5_pas.c
> +++ b/drivers/remoteproc/qcom_q6v5_pas.c
> @@ -509,16 +509,16 @@ static int adsp_pds_attach(struct device *dev, struct device **devs,
> if (!pd_names)
> return 0;
>
> + while (pd_names[num_pds])
> + num_pds++;
> +
> /* Handle single power domain */
> - if (dev->pm_domain) {
> + if (num_pds == 1 && dev->pm_domain) {
> devs[0] = dev;
> pm_runtime_enable(dev);
> return 1;
> }
>
> - while (pd_names[num_pds])
> - num_pds++;
> -
> for (i = 0; i < num_pds; i++) {
> devs[i] = dev_pm_domain_attach_by_name(dev, pd_names[i]);
> if (IS_ERR_OR_NULL(devs[i])) {
> @@ -543,7 +543,7 @@ static void adsp_pds_detach(struct qcom_adsp *adsp, struct device **pds,
> int i;
>
> /* Handle single power domain */
> - if (dev->pm_domain && pd_count) {
> + if (pd_count == 1 && dev->pm_domain) {
> pm_runtime_disable(dev);
> return;
> }
>
> --
> 2.48.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-01-29 8:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-28 21:53 [PATCH 0/2] qcom_q6v5_pas fixes for msm8226 Luca Weiss
2025-01-28 21:53 ` [PATCH 1/2] remoteproc: qcom_q6v5_pas: Use resource with CX PD for MSM8226 Luca Weiss
2025-01-29 8:17 ` Stephan Gerhold
2025-01-28 21:54 ` [PATCH 2/2] remoteproc: qcom_q6v5_pas: Make single-PD handling more robust Luca Weiss
2025-01-29 8:18 ` Stephan Gerhold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox