* [PATCH] arm64: dts: qcom: sc8280xp: Define CMA region for CRD and X13s
@ 2023-01-13 4:10 Bjorn Andersson
2023-01-13 14:17 ` Konrad Dybcio
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Bjorn Andersson @ 2023-01-13 4:10 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio
Cc: Rob Herring, Krzysztof Kozlowski, linux-arm-msm, devicetree,
linux-kernel, Johan Hovold
Booting the CRD needs roughly 64MB CMA, rather than relying on people
adding boot parameters etc define a region for this, to remove the
allocation errors from e.g. NVME.
While fixing the CRD define the same region for the X13s.
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
---
arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 9 +++++++++
.../boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 9 +++++++++
2 files changed, 18 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
index b29c02307839..e30a37c73b90 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
@@ -128,6 +128,15 @@ vreg_wwan: regulator-wwan {
regulator-boot-on;
};
+
+ reserved-memory {
+ linux,cma {
+ compatible = "shared-dma-pool";
+ size = <0x0 0x8000000>;
+ reusable;
+ linux,cma-default;
+ };
+ };
};
&apps_rsc {
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
index 78e61a8184c5..5bfd1f0b2a24 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
@@ -153,6 +153,15 @@ vreg_wwan: regulator-wwan {
regulator-boot-on;
};
+ reserved-memory {
+ linux,cma {
+ compatible = "shared-dma-pool";
+ size = <0x0 0x8000000>;
+ reusable;
+ linux,cma-default;
+ };
+ };
+
thermal-zones {
skin-temp-thermal {
polling-delay-passive = <250>;
--
2.37.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] arm64: dts: qcom: sc8280xp: Define CMA region for CRD and X13s
2023-01-13 4:10 [PATCH] arm64: dts: qcom: sc8280xp: Define CMA region for CRD and X13s Bjorn Andersson
@ 2023-01-13 14:17 ` Konrad Dybcio
2023-01-17 1:57 ` Bjorn Andersson
2023-01-13 20:16 ` Andrew Halaney
2023-01-15 4:11 ` Manivannan Sadhasivam
2 siblings, 1 reply; 5+ messages in thread
From: Konrad Dybcio @ 2023-01-13 14:17 UTC (permalink / raw)
To: Bjorn Andersson, Andy Gross, Bjorn Andersson
Cc: Rob Herring, Krzysztof Kozlowski, linux-arm-msm, devicetree,
linux-kernel, Johan Hovold
On 13.01.2023 05:10, Bjorn Andersson wrote:
> Booting the CRD needs roughly 64MB CMA, rather than relying on people
> adding boot parameters etc define a region for this, to remove the
> allocation errors from e.g. NVME.
>
> While fixing the CRD define the same region for the X13s.
>
> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
> ---
So, to reiterate, the NVMe needs ~64M of contiguous RAM for
$reasons and without this patch, it is not guaranteed that
it can always find such a block which causes issues and
adding a CMA region resolves that, is that correct?
Konrad
> arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 9 +++++++++
> .../boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 9 +++++++++
> 2 files changed, 18 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> index b29c02307839..e30a37c73b90 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> @@ -128,6 +128,15 @@ vreg_wwan: regulator-wwan {
>
> regulator-boot-on;
> };
> +
> + reserved-memory {
> + linux,cma {
> + compatible = "shared-dma-pool";
> + size = <0x0 0x8000000>;
> + reusable;
> + linux,cma-default;
> + };
> + };
> };
>
> &apps_rsc {
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> index 78e61a8184c5..5bfd1f0b2a24 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> @@ -153,6 +153,15 @@ vreg_wwan: regulator-wwan {
> regulator-boot-on;
> };
>
> + reserved-memory {
> + linux,cma {
> + compatible = "shared-dma-pool";
> + size = <0x0 0x8000000>;
> + reusable;
> + linux,cma-default;
> + };
> + };
> +
> thermal-zones {
> skin-temp-thermal {
> polling-delay-passive = <250>;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] arm64: dts: qcom: sc8280xp: Define CMA region for CRD and X13s
2023-01-13 4:10 [PATCH] arm64: dts: qcom: sc8280xp: Define CMA region for CRD and X13s Bjorn Andersson
2023-01-13 14:17 ` Konrad Dybcio
@ 2023-01-13 20:16 ` Andrew Halaney
2023-01-15 4:11 ` Manivannan Sadhasivam
2 siblings, 0 replies; 5+ messages in thread
From: Andrew Halaney @ 2023-01-13 20:16 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel,
Johan Hovold
On Thu, Jan 12, 2023 at 08:10:25PM -0800, Bjorn Andersson wrote:
> Booting the CRD needs roughly 64MB CMA, rather than relying on people
> adding boot parameters etc define a region for this, to remove the
> allocation errors from e.g. NVME.
>
> While fixing the CRD define the same region for the X13s.
>
> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
I'm not sure if I've seen this issue in the past, but booting with this
applied isn't showing any obvious problems like described in the commit.
It would be nice as Konrad said to be a little more explicit about what
you were seeing without this, but that's my personal opinion.
> ---
> arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 9 +++++++++
> .../boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 9 +++++++++
> 2 files changed, 18 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> index b29c02307839..e30a37c73b90 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> @@ -128,6 +128,15 @@ vreg_wwan: regulator-wwan {
>
> regulator-boot-on;
> };
> +
> + reserved-memory {
> + linux,cma {
> + compatible = "shared-dma-pool";
> + size = <0x0 0x8000000>;
> + reusable;
> + linux,cma-default;
> + };
> + };
> };
>
> &apps_rsc {
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> index 78e61a8184c5..5bfd1f0b2a24 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> @@ -153,6 +153,15 @@ vreg_wwan: regulator-wwan {
> regulator-boot-on;
> };
>
> + reserved-memory {
> + linux,cma {
> + compatible = "shared-dma-pool";
> + size = <0x0 0x8000000>;
> + reusable;
> + linux,cma-default;
> + };
> + };
> +
> thermal-zones {
> skin-temp-thermal {
> polling-delay-passive = <250>;
> --
> 2.37.3
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] arm64: dts: qcom: sc8280xp: Define CMA region for CRD and X13s
2023-01-13 4:10 [PATCH] arm64: dts: qcom: sc8280xp: Define CMA region for CRD and X13s Bjorn Andersson
2023-01-13 14:17 ` Konrad Dybcio
2023-01-13 20:16 ` Andrew Halaney
@ 2023-01-15 4:11 ` Manivannan Sadhasivam
2 siblings, 0 replies; 5+ messages in thread
From: Manivannan Sadhasivam @ 2023-01-15 4:11 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel,
Johan Hovold
On Thu, Jan 12, 2023 at 08:10:25PM -0800, Bjorn Andersson wrote:
> Booting the CRD needs roughly 64MB CMA, rather than relying on people
> adding boot parameters etc define a region for this, to remove the
> allocation errors from e.g. NVME.
>
> While fixing the CRD define the same region for the X13s.
>
> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Thanks,
Mani
> ---
> arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 9 +++++++++
> .../boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 9 +++++++++
> 2 files changed, 18 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> index b29c02307839..e30a37c73b90 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> @@ -128,6 +128,15 @@ vreg_wwan: regulator-wwan {
>
> regulator-boot-on;
> };
> +
> + reserved-memory {
> + linux,cma {
> + compatible = "shared-dma-pool";
> + size = <0x0 0x8000000>;
> + reusable;
> + linux,cma-default;
> + };
> + };
> };
>
> &apps_rsc {
> diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> index 78e61a8184c5..5bfd1f0b2a24 100644
> --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> @@ -153,6 +153,15 @@ vreg_wwan: regulator-wwan {
> regulator-boot-on;
> };
>
> + reserved-memory {
> + linux,cma {
> + compatible = "shared-dma-pool";
> + size = <0x0 0x8000000>;
> + reusable;
> + linux,cma-default;
> + };
> + };
> +
> thermal-zones {
> skin-temp-thermal {
> polling-delay-passive = <250>;
> --
> 2.37.3
>
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] arm64: dts: qcom: sc8280xp: Define CMA region for CRD and X13s
2023-01-13 14:17 ` Konrad Dybcio
@ 2023-01-17 1:57 ` Bjorn Andersson
0 siblings, 0 replies; 5+ messages in thread
From: Bjorn Andersson @ 2023-01-17 1:57 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Bjorn Andersson, Andy Gross, Rob Herring, Krzysztof Kozlowski,
linux-arm-msm, devicetree, linux-kernel, Johan Hovold
On Fri, Jan 13, 2023 at 03:17:05PM +0100, Konrad Dybcio wrote:
>
>
> On 13.01.2023 05:10, Bjorn Andersson wrote:
> > Booting the CRD needs roughly 64MB CMA, rather than relying on people
> > adding boot parameters etc define a region for this, to remove the
> > allocation errors from e.g. NVME.
> >
> > While fixing the CRD define the same region for the X13s.
> >
> > Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
> > ---
> So, to reiterate, the NVMe needs ~64M of contiguous RAM for
> $reasons and without this patch, it is not guaranteed that
> it can always find such a block which causes issues and
> adding a CMA region resolves that, is that correct?
>
That's correct, $reasons being that NVMe complains about failures to
allocate CMA memory. I'll post a v2 with this in the commit message.
Thanks,
Bjorn
> Konrad
> > arch/arm64/boot/dts/qcom/sc8280xp-crd.dts | 9 +++++++++
> > .../boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 9 +++++++++
> > 2 files changed, 18 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> > index b29c02307839..e30a37c73b90 100644
> > --- a/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> > +++ b/arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
> > @@ -128,6 +128,15 @@ vreg_wwan: regulator-wwan {
> >
> > regulator-boot-on;
> > };
> > +
> > + reserved-memory {
> > + linux,cma {
> > + compatible = "shared-dma-pool";
> > + size = <0x0 0x8000000>;
> > + reusable;
> > + linux,cma-default;
> > + };
> > + };
> > };
> >
> > &apps_rsc {
> > diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> > index 78e61a8184c5..5bfd1f0b2a24 100644
> > --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> > +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts
> > @@ -153,6 +153,15 @@ vreg_wwan: regulator-wwan {
> > regulator-boot-on;
> > };
> >
> > + reserved-memory {
> > + linux,cma {
> > + compatible = "shared-dma-pool";
> > + size = <0x0 0x8000000>;
> > + reusable;
> > + linux,cma-default;
> > + };
> > + };
> > +
> > thermal-zones {
> > skin-temp-thermal {
> > polling-delay-passive = <250>;
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-01-17 1:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-13 4:10 [PATCH] arm64: dts: qcom: sc8280xp: Define CMA region for CRD and X13s Bjorn Andersson
2023-01-13 14:17 ` Konrad Dybcio
2023-01-17 1:57 ` Bjorn Andersson
2023-01-13 20:16 ` Andrew Halaney
2023-01-15 4:11 ` Manivannan Sadhasivam
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).