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

drm/arcpgu: use dedicated memory area for frame buffer

Now when ARC supports reserved memory areas and
per-device coherent DMA allocations we may switch ARC PGU
to use of those dedicated areas.

One of the benefits we may move frame-buffer area out
from IO Coherency aperture and so significantly
reduce IOC utilization allowing less demanding
peripherals to use all perks of IOC.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Dave Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: linux-kernel@vger.kernel.org
Cc: linux-snps-arc@lists.infradead.org

+6
+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;