From 9374feefb0bdc2fcd91e577d6b70875dcfd2a0d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Walstr=C3=B6m?= Date: Sat, 23 Aug 2025 20:00:05 +0200 Subject: [PATCH] board: rpi-4: Reserve memory correct for GPU --- .../dts/broadcom/bcm2711-rpi-4-b.dts | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/board/raspberry-pi-4/dts/broadcom/bcm2711-rpi-4-b.dts b/src/board/raspberry-pi-4/dts/broadcom/bcm2711-rpi-4-b.dts index 98568d81..cdf4fa68 100644 --- a/src/board/raspberry-pi-4/dts/broadcom/bcm2711-rpi-4-b.dts +++ b/src/board/raspberry-pi-4/dts/broadcom/bcm2711-rpi-4-b.dts @@ -1,18 +1,21 @@ #include / { - memory@0 { - device_type = "memory"; - reg = <0x0 0x0 0x0 0x30000000>; /* Reserve top 256MB for GPU */ + /* Dynamic GPU reservation */ + gpu-reserved { + size = <0x0 0x10000000>; /* 256MB */ + alignment = <0x0 0x1000000>; /* 16MB aligned */ + alloc-ranges = <0x0 0x10000000 0x1 0x00000000>; /* Allow anywhere in RAM */ + no-map; }; - reserved-memory { - #address-cells = <2>; - #size-cells = <2>; - ranges; - gpu_reserved: gpu@30000000 { - reg = <0x0 0x30000000 0x0 0x10000000>; - no-map; - }; + + /* CMA pool */ + cma-reserved { + compatible = "shared-dma-pool"; + size = <0x0 0x10000000>; /* 256MB */ + alignment = <0x0 0x1000000>; /* 16MB aligned */ + linux,cma-default; + reusable; }; panel_disp: panel_disp@1 {