* [PATCH 1/3] soc: qcom: ocmem: make the core clock optional
2026-03-23 1:20 [PATCH 0/3] soc: qcom: ocmem: let the driver work again Dmitry Baryshkov
@ 2026-03-23 1:20 ` Dmitry Baryshkov
2026-03-23 10:15 ` Konrad Dybcio
2026-03-23 1:20 ` [PATCH 2/3] soc: qcom: ocmem: register reasons for probe deferrals Dmitry Baryshkov
` (2 subsequent siblings)
3 siblings, 1 reply; 11+ messages in thread
From: Dmitry Baryshkov @ 2026-03-23 1:20 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Stephen Boyd, Georgi Djakov,
Rob Clark, Brian Masney
Cc: linux-arm-msm, linux-kernel
OCMEM's core clock (aka RPM bus 2 clock) is being handled internally by
the interconnect driver. Corresponding clock has been dropped from the
SMD RPM clock driver. The users of the ocmem will vote on the ocmemnoc
interconnect paths, making sure that ocmem is on. Make the clock
optional, keeping it for compatibility with older DT.
Fixes: d6edc31f3a68 ("clk: qcom: smd-rpm: Separate out interconnect bus clocks")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
drivers/soc/qcom/ocmem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/qcom/ocmem.c b/drivers/soc/qcom/ocmem.c
index 6a23f18b0281..dd46bb14b7be 100644
--- a/drivers/soc/qcom/ocmem.c
+++ b/drivers/soc/qcom/ocmem.c
@@ -308,7 +308,7 @@ static int ocmem_dev_probe(struct platform_device *pdev)
ocmem->dev = dev;
ocmem->config = device_get_match_data(dev);
- ocmem->core_clk = devm_clk_get(dev, "core");
+ ocmem->core_clk = devm_clk_get_optional(dev, "core");
if (IS_ERR(ocmem->core_clk))
return dev_err_probe(dev, PTR_ERR(ocmem->core_clk),
"Unable to get core clock\n");
--
2.47.3
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH 1/3] soc: qcom: ocmem: make the core clock optional
2026-03-23 1:20 ` [PATCH 1/3] soc: qcom: ocmem: make the core clock optional Dmitry Baryshkov
@ 2026-03-23 10:15 ` Konrad Dybcio
0 siblings, 0 replies; 11+ messages in thread
From: Konrad Dybcio @ 2026-03-23 10:15 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, Stephen Boyd,
Georgi Djakov, Rob Clark, Brian Masney
Cc: linux-arm-msm, linux-kernel
On 3/23/26 2:20 AM, Dmitry Baryshkov wrote:
> OCMEM's core clock (aka RPM bus 2 clock) is being handled internally by
> the interconnect driver. Corresponding clock has been dropped from the
> SMD RPM clock driver. The users of the ocmem will vote on the ocmemnoc
> interconnect paths, making sure that ocmem is on. Make the clock
> optional, keeping it for compatibility with older DT.
>
> Fixes: d6edc31f3a68 ("clk: qcom: smd-rpm: Separate out interconnect bus clocks")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 2/3] soc: qcom: ocmem: register reasons for probe deferrals
2026-03-23 1:20 [PATCH 0/3] soc: qcom: ocmem: let the driver work again Dmitry Baryshkov
2026-03-23 1:20 ` [PATCH 1/3] soc: qcom: ocmem: make the core clock optional Dmitry Baryshkov
@ 2026-03-23 1:20 ` Dmitry Baryshkov
2026-03-23 10:16 ` Konrad Dybcio
2026-03-23 11:07 ` Brian Masney
2026-03-23 1:20 ` [PATCH 3/3] soc: qcom: ocmem: return -EPROBE_DEFER is ocmem is not available Dmitry Baryshkov
2026-03-24 3:05 ` [PATCH 0/3] soc: qcom: ocmem: let the driver work again Bjorn Andersson
3 siblings, 2 replies; 11+ messages in thread
From: Dmitry Baryshkov @ 2026-03-23 1:20 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Stephen Boyd, Georgi Djakov,
Rob Clark, Brian Masney
Cc: linux-arm-msm, linux-kernel
Instead of printing messages to the dmesg, let the message be recorded
as a reason for the OCMEM client deferral.
Fixes: 88c1e9404f1d ("soc: qcom: add OCMEM driver")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
drivers/soc/qcom/ocmem.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/soc/qcom/ocmem.c b/drivers/soc/qcom/ocmem.c
index dd46bb14b7be..d57baa9cfa03 100644
--- a/drivers/soc/qcom/ocmem.c
+++ b/drivers/soc/qcom/ocmem.c
@@ -196,10 +196,10 @@ struct ocmem *of_get_ocmem(struct device *dev)
}
pdev = of_find_device_by_node(devnode->parent);
- if (!pdev) {
- dev_err(dev, "Cannot find device node %s\n", devnode->name);
- return ERR_PTR(-EPROBE_DEFER);
- }
+ if (!pdev)
+ return ERR_PTR(dev_err_probe(dev, -EPROBE_DEFER,
+ "Cannot find device node %s\n",
+ devnode->name));
ocmem = platform_get_drvdata(pdev);
put_device(&pdev->dev);
--
2.47.3
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH 2/3] soc: qcom: ocmem: register reasons for probe deferrals
2026-03-23 1:20 ` [PATCH 2/3] soc: qcom: ocmem: register reasons for probe deferrals Dmitry Baryshkov
@ 2026-03-23 10:16 ` Konrad Dybcio
2026-03-23 23:02 ` Dmitry Baryshkov
2026-03-23 11:07 ` Brian Masney
1 sibling, 1 reply; 11+ messages in thread
From: Konrad Dybcio @ 2026-03-23 10:16 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, Stephen Boyd,
Georgi Djakov, Rob Clark, Brian Masney
Cc: linux-arm-msm, linux-kernel
On 3/23/26 2:20 AM, Dmitry Baryshkov wrote:
> Instead of printing messages to the dmesg, let the message be recorded
> as a reason for the OCMEM client deferral.
>
> Fixes: 88c1e9404f1d ("soc: qcom: add OCMEM driver")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> drivers/soc/qcom/ocmem.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/soc/qcom/ocmem.c b/drivers/soc/qcom/ocmem.c
> index dd46bb14b7be..d57baa9cfa03 100644
> --- a/drivers/soc/qcom/ocmem.c
> +++ b/drivers/soc/qcom/ocmem.c
> @@ -196,10 +196,10 @@ struct ocmem *of_get_ocmem(struct device *dev)
> }
>
> pdev = of_find_device_by_node(devnode->parent);
> - if (!pdev) {
> - dev_err(dev, "Cannot find device node %s\n", devnode->name);
> - return ERR_PTR(-EPROBE_DEFER);
> - }
> + if (!pdev)
> + return ERR_PTR(dev_err_probe(dev, -EPROBE_DEFER,
> + "Cannot find device node %s\n",
> + devnode->name));
dev_err_ptr_probe()
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH 2/3] soc: qcom: ocmem: register reasons for probe deferrals
2026-03-23 10:16 ` Konrad Dybcio
@ 2026-03-23 23:02 ` Dmitry Baryshkov
0 siblings, 0 replies; 11+ messages in thread
From: Dmitry Baryshkov @ 2026-03-23 23:02 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Bjorn Andersson, Konrad Dybcio, Stephen Boyd, Georgi Djakov,
Rob Clark, Brian Masney, linux-arm-msm, linux-kernel
On Mon, Mar 23, 2026 at 11:16:54AM +0100, Konrad Dybcio wrote:
> On 3/23/26 2:20 AM, Dmitry Baryshkov wrote:
> > Instead of printing messages to the dmesg, let the message be recorded
> > as a reason for the OCMEM client deferral.
> >
> > Fixes: 88c1e9404f1d ("soc: qcom: add OCMEM driver")
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> > ---
> > drivers/soc/qcom/ocmem.c | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/soc/qcom/ocmem.c b/drivers/soc/qcom/ocmem.c
> > index dd46bb14b7be..d57baa9cfa03 100644
> > --- a/drivers/soc/qcom/ocmem.c
> > +++ b/drivers/soc/qcom/ocmem.c
> > @@ -196,10 +196,10 @@ struct ocmem *of_get_ocmem(struct device *dev)
> > }
> >
> > pdev = of_find_device_by_node(devnode->parent);
> > - if (!pdev) {
> > - dev_err(dev, "Cannot find device node %s\n", devnode->name);
> > - return ERR_PTR(-EPROBE_DEFER);
> > - }
> > + if (!pdev)
> > + return ERR_PTR(dev_err_probe(dev, -EPROBE_DEFER,
> > + "Cannot find device node %s\n",
> > + devnode->name));
>
> dev_err_ptr_probe()
Cool!
>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>
> Konrad
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/3] soc: qcom: ocmem: register reasons for probe deferrals
2026-03-23 1:20 ` [PATCH 2/3] soc: qcom: ocmem: register reasons for probe deferrals Dmitry Baryshkov
2026-03-23 10:16 ` Konrad Dybcio
@ 2026-03-23 11:07 ` Brian Masney
2026-03-23 23:03 ` Dmitry Baryshkov
1 sibling, 1 reply; 11+ messages in thread
From: Brian Masney @ 2026-03-23 11:07 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Bjorn Andersson, Konrad Dybcio, Stephen Boyd, Georgi Djakov,
Rob Clark, Brian Masney, linux-arm-msm, linux-kernel
On Mon, Mar 23, 2026 at 03:20:58AM +0200, Dmitry Baryshkov wrote:
> Instead of printing messages to the dmesg, let the message be recorded
> as a reason for the OCMEM client deferral.
>
> Fixes: 88c1e9404f1d ("soc: qcom: add OCMEM driver")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> drivers/soc/qcom/ocmem.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/soc/qcom/ocmem.c b/drivers/soc/qcom/ocmem.c
> index dd46bb14b7be..d57baa9cfa03 100644
> --- a/drivers/soc/qcom/ocmem.c
> +++ b/drivers/soc/qcom/ocmem.c
> @@ -196,10 +196,10 @@ struct ocmem *of_get_ocmem(struct device *dev)
> }
>
> pdev = of_find_device_by_node(devnode->parent);
> - if (!pdev) {
> - dev_err(dev, "Cannot find device node %s\n", devnode->name);
> - return ERR_PTR(-EPROBE_DEFER);
> - }
> + if (!pdev)
> + return ERR_PTR(dev_err_probe(dev, -EPROBE_DEFER,
> + "Cannot find device node %s\n",
> + devnode->name));
Reviewed-by: Brian Masney <bmasney@redhat.com>
dev_err_probe() was introduced in 2020 (a787e5400a1c) and this driver
was added to the tree prior to that.
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH 2/3] soc: qcom: ocmem: register reasons for probe deferrals
2026-03-23 11:07 ` Brian Masney
@ 2026-03-23 23:03 ` Dmitry Baryshkov
0 siblings, 0 replies; 11+ messages in thread
From: Dmitry Baryshkov @ 2026-03-23 23:03 UTC (permalink / raw)
To: Brian Masney
Cc: Bjorn Andersson, Konrad Dybcio, Stephen Boyd, Georgi Djakov,
Rob Clark, Brian Masney, linux-arm-msm, linux-kernel
On Mon, Mar 23, 2026 at 07:07:40AM -0400, Brian Masney wrote:
> On Mon, Mar 23, 2026 at 03:20:58AM +0200, Dmitry Baryshkov wrote:
> > Instead of printing messages to the dmesg, let the message be recorded
> > as a reason for the OCMEM client deferral.
> >
> > Fixes: 88c1e9404f1d ("soc: qcom: add OCMEM driver")
> > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> > ---
> > drivers/soc/qcom/ocmem.c | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/soc/qcom/ocmem.c b/drivers/soc/qcom/ocmem.c
> > index dd46bb14b7be..d57baa9cfa03 100644
> > --- a/drivers/soc/qcom/ocmem.c
> > +++ b/drivers/soc/qcom/ocmem.c
> > @@ -196,10 +196,10 @@ struct ocmem *of_get_ocmem(struct device *dev)
> > }
> >
> > pdev = of_find_device_by_node(devnode->parent);
> > - if (!pdev) {
> > - dev_err(dev, "Cannot find device node %s\n", devnode->name);
> > - return ERR_PTR(-EPROBE_DEFER);
> > - }
> > + if (!pdev)
> > + return ERR_PTR(dev_err_probe(dev, -EPROBE_DEFER,
> > + "Cannot find device node %s\n",
> > + devnode->name));
>
> Reviewed-by: Brian Masney <bmasney@redhat.com>
>
> dev_err_probe() was introduced in 2020 (a787e5400a1c) and this driver
> was added to the tree prior to that.
Well... Fixes doesnt' require porting (or 1:1 porting).
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 3/3] soc: qcom: ocmem: return -EPROBE_DEFER is ocmem is not available
2026-03-23 1:20 [PATCH 0/3] soc: qcom: ocmem: let the driver work again Dmitry Baryshkov
2026-03-23 1:20 ` [PATCH 1/3] soc: qcom: ocmem: make the core clock optional Dmitry Baryshkov
2026-03-23 1:20 ` [PATCH 2/3] soc: qcom: ocmem: register reasons for probe deferrals Dmitry Baryshkov
@ 2026-03-23 1:20 ` Dmitry Baryshkov
2026-03-23 10:17 ` Konrad Dybcio
2026-03-24 3:05 ` [PATCH 0/3] soc: qcom: ocmem: let the driver work again Bjorn Andersson
3 siblings, 1 reply; 11+ messages in thread
From: Dmitry Baryshkov @ 2026-03-23 1:20 UTC (permalink / raw)
To: Bjorn Andersson, Konrad Dybcio, Stephen Boyd, Georgi Djakov,
Rob Clark, Brian Masney
Cc: linux-arm-msm, linux-kernel
If OCMEM is declared in DT, it is expected that it is present and
handled by the driver. The GPU driver will ignore -ENODEV error, which
typically means that OCMEM isn't defined in DT. Let ocmem return
-EPROBE_DEFER if it supposed to be used, but it is not probed (yet).
Fixes: 88c1e9404f1d ("soc: qcom: add OCMEM driver")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
---
drivers/soc/qcom/ocmem.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/soc/qcom/ocmem.c b/drivers/soc/qcom/ocmem.c
index d57baa9cfa03..c35a98984acc 100644
--- a/drivers/soc/qcom/ocmem.c
+++ b/drivers/soc/qcom/ocmem.c
@@ -203,10 +203,9 @@ struct ocmem *of_get_ocmem(struct device *dev)
ocmem = platform_get_drvdata(pdev);
put_device(&pdev->dev);
- if (!ocmem) {
- dev_err(dev, "Cannot get ocmem\n");
- return ERR_PTR(-ENODEV);
- }
+ if (!ocmem)
+ return ERR_PTR(dev_err_probe(dev, -EPROBE_DEFER, "Cannot get ocmem\n"));
+
return ocmem;
}
EXPORT_SYMBOL_GPL(of_get_ocmem);
--
2.47.3
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH 3/3] soc: qcom: ocmem: return -EPROBE_DEFER is ocmem is not available
2026-03-23 1:20 ` [PATCH 3/3] soc: qcom: ocmem: return -EPROBE_DEFER is ocmem is not available Dmitry Baryshkov
@ 2026-03-23 10:17 ` Konrad Dybcio
0 siblings, 0 replies; 11+ messages in thread
From: Konrad Dybcio @ 2026-03-23 10:17 UTC (permalink / raw)
To: Dmitry Baryshkov, Bjorn Andersson, Konrad Dybcio, Stephen Boyd,
Georgi Djakov, Rob Clark, Brian Masney
Cc: linux-arm-msm, linux-kernel
On 3/23/26 2:20 AM, Dmitry Baryshkov wrote:
> If OCMEM is declared in DT, it is expected that it is present and
> handled by the driver. The GPU driver will ignore -ENODEV error, which
> typically means that OCMEM isn't defined in DT. Let ocmem return
> -EPROBE_DEFER if it supposed to be used, but it is not probed (yet).
>
> Fixes: 88c1e9404f1d ("soc: qcom: add OCMEM driver")
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> ---
> drivers/soc/qcom/ocmem.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/soc/qcom/ocmem.c b/drivers/soc/qcom/ocmem.c
> index d57baa9cfa03..c35a98984acc 100644
> --- a/drivers/soc/qcom/ocmem.c
> +++ b/drivers/soc/qcom/ocmem.c
> @@ -203,10 +203,9 @@ struct ocmem *of_get_ocmem(struct device *dev)
>
> ocmem = platform_get_drvdata(pdev);
> put_device(&pdev->dev);
> - if (!ocmem) {
> - dev_err(dev, "Cannot get ocmem\n");
> - return ERR_PTR(-ENODEV);
> - }
> + if (!ocmem)
> + return ERR_PTR(dev_err_probe(dev, -EPROBE_DEFER, "Cannot get ocmem\n"));
dev_err_ptr_probe()
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/3] soc: qcom: ocmem: let the driver work again
2026-03-23 1:20 [PATCH 0/3] soc: qcom: ocmem: let the driver work again Dmitry Baryshkov
` (2 preceding siblings ...)
2026-03-23 1:20 ` [PATCH 3/3] soc: qcom: ocmem: return -EPROBE_DEFER is ocmem is not available Dmitry Baryshkov
@ 2026-03-24 3:05 ` Bjorn Andersson
3 siblings, 0 replies; 11+ messages in thread
From: Bjorn Andersson @ 2026-03-24 3:05 UTC (permalink / raw)
To: Konrad Dybcio, Stephen Boyd, Georgi Djakov, Rob Clark,
Brian Masney, Dmitry Baryshkov
Cc: linux-arm-msm, linux-kernel
On Mon, 23 Mar 2026 03:20:56 +0200, Dmitry Baryshkov wrote:
> Commit d6edc31f3a68 ("clk: qcom: smd-rpm: Separate out interconnect bus
> clocks") moved control over several RPM resources from the clk-smd-rpm
> driver to the icc-rpm.c interconnect helpers. However it was unnoticed
> that the OCMEM device also uses that clock. The clock is not required as
> all OCMEM users (currently only the GPU) will vote on the OCMEM NOC,
> bringing up the clock. Make it optional (and also apply several other
> small fixes).
>
> [...]
Applied, thanks!
[1/3] soc: qcom: ocmem: make the core clock optional
commit: e8a61c51417c679d1a599fb36695e9d3b8d95514
[2/3] soc: qcom: ocmem: register reasons for probe deferrals
commit: 9dfd69cd89cd6afa4723be9098979abeef3bb8c6
[3/3] soc: qcom: ocmem: return -EPROBE_DEFER is ocmem is not available
commit: 91b59009c7d48b58dbc50fecb27f2ad20749a05a
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 11+ messages in thread