* [PATCH v2] arm64: dts: qcom: sc8280xp: Define CMA region for CRD and X13s
@ 2023-01-17 18:46 Bjorn Andersson
2023-01-18 13:24 ` Konrad Dybcio
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Bjorn Andersson @ 2023-01-17 18:46 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio
Cc: Rob Herring, Krzysztof Kozlowski, linux-arm-msm, devicetree,
linux-kernel, Andrew Halaney, Manivannan Sadhasivam
While booting the CRD, a series of CMA allocation errors can be seen in
the kernel log:
cma: cma_alloc: reserved: alloc failed, req-size: 128 pages, ret: -12
Growing the CMA region and querying /proc/meminfo indicates that a newly
booted system (currently) uses 64MB CMA.
Define a memory region sufficiently large for the current use cases, to
avoid forcing users to add this themselves, through command line
parameters etc.
While fixing the CRD define the same region for the X13s.
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
---
Changes since v1:
- Updated commit message
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 4e92dc28e2ce..6f686377dc3e 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 55ecbee19a58..8d485e0000cf 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.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v2] arm64: dts: qcom: sc8280xp: Define CMA region for CRD and X13s
2023-01-17 18:46 [PATCH v2] arm64: dts: qcom: sc8280xp: Define CMA region for CRD and X13s Bjorn Andersson
@ 2023-01-18 13:24 ` Konrad Dybcio
2023-01-18 22:50 ` Bjorn Andersson
2023-01-19 8:00 ` Johan Hovold
2 siblings, 0 replies; 4+ messages in thread
From: Konrad Dybcio @ 2023-01-18 13:24 UTC (permalink / raw)
To: Bjorn Andersson, Andy Gross, Bjorn Andersson
Cc: Rob Herring, Krzysztof Kozlowski, linux-arm-msm, devicetree,
linux-kernel, Andrew Halaney, Manivannan Sadhasivam
On 17.01.2023 19:46, Bjorn Andersson wrote:
> While booting the CRD, a series of CMA allocation errors can be seen in
> the kernel log:
>
> cma: cma_alloc: reserved: alloc failed, req-size: 128 pages, ret: -12
>
> Growing the CMA region and querying /proc/meminfo indicates that a newly
> booted system (currently) uses 64MB CMA.
>
> Define a memory region sufficiently large for the current use cases, to
> avoid forcing users to add this themselves, through command line
> parameters etc.
>
> While fixing the CRD define the same region for the X13s.
>
> Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Konrad
>
> Changes since v1:
> - Updated commit message
>
> 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 4e92dc28e2ce..6f686377dc3e 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 55ecbee19a58..8d485e0000cf 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] 4+ messages in thread* Re: [PATCH v2] arm64: dts: qcom: sc8280xp: Define CMA region for CRD and X13s
2023-01-17 18:46 [PATCH v2] arm64: dts: qcom: sc8280xp: Define CMA region for CRD and X13s Bjorn Andersson
2023-01-18 13:24 ` Konrad Dybcio
@ 2023-01-18 22:50 ` Bjorn Andersson
2023-01-19 8:00 ` Johan Hovold
2 siblings, 0 replies; 4+ messages in thread
From: Bjorn Andersson @ 2023-01-18 22:50 UTC (permalink / raw)
To: konrad.dybcio, quic_bjorande, agross
Cc: ahalaney, robh+dt, devicetree, linux-arm-msm, linux-kernel,
krzysztof.kozlowski+dt, Manivannan Sadhasivam
On Tue, 17 Jan 2023 10:46:30 -0800, Bjorn Andersson wrote:
> While booting the CRD, a series of CMA allocation errors can be seen in
> the kernel log:
>
> cma: cma_alloc: reserved: alloc failed, req-size: 128 pages, ret: -12
>
> Growing the CMA region and querying /proc/meminfo indicates that a newly
> booted system (currently) uses 64MB CMA.
>
> [...]
Applied, thanks!
[1/1] arm64: dts: qcom: sc8280xp: Define CMA region for CRD and X13s
commit: 5f84c7c35d49e6d92b720db19d421951f1ff8599
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v2] arm64: dts: qcom: sc8280xp: Define CMA region for CRD and X13s
2023-01-17 18:46 [PATCH v2] arm64: dts: qcom: sc8280xp: Define CMA region for CRD and X13s Bjorn Andersson
2023-01-18 13:24 ` Konrad Dybcio
2023-01-18 22:50 ` Bjorn Andersson
@ 2023-01-19 8:00 ` Johan Hovold
2 siblings, 0 replies; 4+ messages in thread
From: Johan Hovold @ 2023-01-19 8:00 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, linux-arm-msm, devicetree, linux-kernel,
Andrew Halaney, Manivannan Sadhasivam
On Tue, Jan 17, 2023 at 10:46:30AM -0800, Bjorn Andersson wrote:
> While booting the CRD, a series of CMA allocation errors can be seen in
> the kernel log:
>
> cma: cma_alloc: reserved: alloc failed, req-size: 128 pages, ret: -12
>
> Growing the CMA region and querying /proc/meminfo indicates that a newly
> booted system (currently) uses 64MB CMA.
The NVMe driver buffers alone always take up 64 MB and in total roughly
92 MB is used on the CRD after boot here. Perhaps you're missing some
driver in you config (e.g. modem or wifi?).
On the X13s I even have 105 MB allocated after boot.
That's why I increased the CMA region to 128 MB in my out-of-tree
config, which is also what you are doing here but in the devicetree.
> Define a memory region sufficiently large for the current use cases, to
> avoid forcing users to add this themselves, through command line
> parameters etc.
>
> While fixing the CRD define the same region for the X13s.
>
> Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
> ---
>
> Changes since v1:
> - Updated commit message
> +
> + reserved-memory {
> + linux,cma {
> + compatible = "shared-dma-pool";
> + size = <0x0 0x8000000>;
> + reusable;
> + linux,cma-default;
> + };
> + };
> };
Johan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-01-20 5:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-17 18:46 [PATCH v2] arm64: dts: qcom: sc8280xp: Define CMA region for CRD and X13s Bjorn Andersson
2023-01-18 13:24 ` Konrad Dybcio
2023-01-18 22:50 ` Bjorn Andersson
2023-01-19 8:00 ` Johan Hovold
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).