summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-05-17 06:36:08 +1000
committerDave Airlie <airlied@redhat.com>2016-05-17 06:36:08 +1000
commit76e9cab5403809fa1fa6f698d2f7c1b7dd224022 (patch)
tree67dd3fdb97467ba4c62b1544c0a97aa5a057f06e /drivers/gpu
parentcf15fabd6f66e966ae5744f088538f7936df9a4d (diff)
parentcb2ad5e5339c5122166265cea579cc6a356d46de (diff)
downloadop-kernel-dev-76e9cab5403809fa1fa6f698d2f7c1b7dd224022.zip
op-kernel-dev-76e9cab5403809fa1fa6f698d2f7c1b7dd224022.tar.gz
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
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/arc/arcpgu_drv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c
index 5b35e5d..76e187a 100644
--- a/drivers/gpu/drm/arc/arcpgu_drv.c
+++ b/drivers/gpu/drm/arc/arcpgu_drv.c
@@ -19,6 +19,7 @@
#include <drm/drm_fb_cma_helper.h>
#include <drm/drm_gem_cma_helper.h>
#include <drm/drm_atomic_helper.h>
+#include <linux/of_reserved_mem.h>
#include "arcpgu.h"
#include "arcpgu_regs.h"
@@ -135,6 +136,11 @@ static int arcpgu_load(struct drm_device *drm)
dev_info(drm->dev, "arc_pgu ID: 0x%x\n",
arc_pgu_read(arcpgu, ARCPGU_REG_ID));
+ /* Get the optional framebuffer memory resource */
+ ret = of_reserved_mem_device_init(drm->dev);
+ if (ret && ret != -ENODEV)
+ return ret;
+
if (dma_set_mask_and_coherent(drm->dev, DMA_BIT_MASK(32)))
return -ENODEV;
OpenPOWER on IntegriCloud