arm64: dts: qcom: sc8280xp: Define CMA region for CRD and X13s
authorBjorn Andersson <quic_bjorande@quicinc.com>
Tue, 17 Jan 2023 18:46:30 +0000 (10:46 -0800)
committerBjorn Andersson <andersson@kernel.org>
Wed, 18 Jan 2023 22:19:56 +0000 (16:19 -0600)
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>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230117184630.2775905-1-quic_bjorande@quicinc.com
arch/arm64/boot/dts/qcom/sc8280xp-crd.dts
arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts

index 4e92dc28e2ce7ee2eae596375f556bab172ce2b2..6f686377dc3eca8f0ac4d025d5a96ddc01b073b2 100644 (file)
 
                regulator-boot-on;
        };
+
+       reserved-memory {
+               linux,cma {
+                       compatible = "shared-dma-pool";
+                       size = <0x0 0x8000000>;
+                       reusable;
+                       linux,cma-default;
+               };
+       };
 };
 
 &apps_rsc {
index ecb7c1ef0fbefc98586feec654c168696243d488..3f464b2b92ee1f1008648b2312fdf0a8879bd9a9 100644 (file)
                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>;