From 99ae6d076ae595bdec9968d5c2f1f506a101bfe4 Mon Sep 17 00:00:00 2001 From: John Stultz Date: Tue, 21 Nov 2017 08:32:59 -0800 Subject: [PATCH] ANDROID: arm64: dts: hikey960: Add CMA entry for DMA-BUF Heap/framebuffers Add CMA entry, as the DRM driver requires phys contig memory for framebuffers. These are normally allocated out of DMA-BUF Heaps by gralloc for the graphics framebuffer. NOTE: On the 4gb boards, if we don't specify the address, the cma region we use for the framebuffer and ion heap may be placed in memory mapped above 32bits. Due to addresses being masked to 32bits for DMA, this resulted in crashes on newer 4gb boards. Thus this patch forces CMA address to be lower in memory. I've picked an address just past a previous CMA reserved chunk, so we shouldn't be adding to any fragmentation. Extra thanks to Ryan Grachek who helped isolate the issue with the CMA buffers being over the 32bit barrier. Bug: 146450171 Change-Id: Ibb7ff1d85a9b93e41c440ffacf6a1ccf6aecb1ca Signed-off-by: John Stultz --- arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts index d14c955288d6..da16078d78a5 100644 --- a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts +++ b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts @@ -53,6 +53,14 @@ ramoops@32000000 { console-size = <0x00020000>; ftrace-size = <0x00020000>; }; + + /* global autoconfigured region for contiguous allocations */ + linux,cma { + compatible = "shared-dma-pool"; + reg = <0x0 0x20C00000 0x0 0x4000000>; + reusable; + linux,cma-default; + }; }; reboot-mode-syscon@32100000 {