MIPS: ingenic: rs90: Add dedicated VRAM memory region
authorPaul Cercueil <paul@crapouillou.net>
Sun, 30 May 2021 17:18:02 +0000 (18:18 +0100)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Tue, 1 Jun 2021 09:44:47 +0000 (11:44 +0200)
Add a 1 MiB memory area dedicated to the video driver. This area will be
managed by Linux' CMA, so that the ingenic-drm driver can be sure to
always be able to allocate contiguous buffers.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/boot/dts/ingenic/rs90.dts

index 4eb1edbfc155a6d226b1833746fdc994aa42863e..74fee7f01352335b7498abc5ab9474fe3b88a7e2 100644 (file)
                reg = <0x0 0x2000000>;
        };
 
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               vmem: video-memory@1f00000 {
+                       compatible = "shared-dma-pool";
+                       reg = <0x1f00000 0x100000>;
+                       reusable;
+               };
+       };
+
        vcc: regulator {
                compatible = "regulator-fixed";
 
 };
 
 &lcd {
+       memory-region = <&vmem>;
+
        pinctrl-names = "default";
        pinctrl-0 = <&pins_lcd>;
 };