Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'topic-arcpgu-updates' of https://github.com/foss-for-synopsys-dwc-arc-processors/linux into drm-next

Please pull this mini-series that allows ARC PGU to use
dedicated memory location as framebuffer backing storage.

* 'topic-arcpgu-updates' of https://github.com/foss-for-synopsys-dwc-arc-processors/linux:
ARC: [axs10x] Specify reserved memory for frame buffer
drm/arcpgu: use dedicated memory area for frame buffer

+55 -3
+20 -2
arch/arc/boot/dts/axc001.dtsi
··· 93 93 memory { 94 94 #address-cells = <1>; 95 95 #size-cells = <1>; 96 - ranges = <0x00000000 0x80000000 0x40000000>; 96 + ranges = <0x00000000 0x80000000 0x20000000>; 97 97 device_type = "memory"; 98 - reg = <0x80000000 0x20000000>; /* 512MiB */ 98 + reg = <0x80000000 0x1b000000>; /* (512 - 32) MiB */ 99 + }; 100 + 101 + reserved-memory { 102 + #address-cells = <1>; 103 + #size-cells = <1>; 104 + ranges; 105 + /* 106 + * We just move frame buffer area to the very end of 107 + * available DDR. And even though in case of ARC770 there's 108 + * no strict requirement for a frame-buffer to be in any 109 + * particular location it allows us to use the same 110 + * base board's DT node for ARC PGU as for ARc HS38. 111 + */ 112 + frame_buffer: frame_buffer@9e000000 { 113 + compatible = "shared-dma-pool"; 114 + reg = <0x9e000000 0x2000000>; 115 + no-map; 116 + }; 99 117 }; 100 118 };
+14
arch/arc/boot/dts/axc003.dtsi
··· 100 100 device_type = "memory"; 101 101 reg = <0x80000000 0x20000000>; /* 512MiB */ 102 102 }; 103 + 104 + reserved-memory { 105 + #address-cells = <1>; 106 + #size-cells = <1>; 107 + ranges; 108 + /* 109 + * Move frame buffer out of IOC aperture (0x8z-0xAz). 110 + */ 111 + frame_buffer: frame_buffer@be000000 { 112 + compatible = "shared-dma-pool"; 113 + reg = <0xbe000000 0x2000000>; 114 + no-map; 115 + }; 116 + }; 103 117 };
+14
arch/arc/boot/dts/axc003_idu.dtsi
··· 123 123 device_type = "memory"; 124 124 reg = <0x80000000 0x20000000>; /* 512MiB */ 125 125 }; 126 + 127 + reserved-memory { 128 + #address-cells = <1>; 129 + #size-cells = <1>; 130 + ranges; 131 + /* 132 + * Move frame buffer out of IOC aperture (0x8z-0xAz). 133 + */ 134 + frame_buffer: frame_buffer@be000000 { 135 + compatible = "shared-dma-pool"; 136 + reg = <0xbe000000 0x2000000>; 137 + no-map; 138 + }; 139 + }; 126 140 };
+1 -1
arch/arc/boot/dts/axs10x_mb.dtsi
··· 275 275 encoder-slave = <&adv7511>; 276 276 clocks = <&pguclk>; 277 277 clock-names = "pxlclk"; 278 - 278 + memory-region = <&frame_buffer>; 279 279 port { 280 280 pgu_output: endpoint { 281 281 remote-endpoint = <&adv7511_input>;
+6
drivers/gpu/drm/arc/arcpgu_drv.c
··· 19 19 #include <drm/drm_fb_cma_helper.h> 20 20 #include <drm/drm_gem_cma_helper.h> 21 21 #include <drm/drm_atomic_helper.h> 22 + #include <linux/of_reserved_mem.h> 22 23 23 24 #include "arcpgu.h" 24 25 #include "arcpgu_regs.h" ··· 135 134 136 135 dev_info(drm->dev, "arc_pgu ID: 0x%x\n", 137 136 arc_pgu_read(arcpgu, ARCPGU_REG_ID)); 137 + 138 + /* Get the optional framebuffer memory resource */ 139 + ret = of_reserved_mem_device_init(drm->dev); 140 + if (ret && ret != -ENODEV) 141 + return ret; 138 142 139 143 if (dma_set_mask_and_coherent(drm->dev, DMA_BIT_MASK(32))) 140 144 return -ENODEV;