aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/exynos/exynos_drm_drv.h
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2016-02-29 17:50:53 +0900
committerInki Dae <daeinki@gmail.com>2016-03-01 23:53:47 +0900
commitf43c35966a5ac6accb197f68b05f14bb4e6d3913 (patch)
treef03d2943e7d3e527dbd6ad67a7274bb7aaf86c17 /drivers/gpu/drm/exynos/exynos_drm_drv.h
parentdrm/exynos: refactor driver and device registration code (diff)
downloadlinux-dev-f43c35966a5ac6accb197f68b05f14bb4e6d3913.tar.xz
linux-dev-f43c35966a5ac6accb197f68b05f14bb4e6d3913.zip
drm/exynos: use real device for DMA-mapping operations
This patch changes device pointer provided to all calls to DMA-mapping subsystem from the virtual exynos-drm 'device' to the real device pointer of one of the CRTC devices (decon, fimd or mixer). This way no more hacks will be needed to configure proper DMA-mapping address space on the common virtual exynos-drm device. This change also removes the need for some hacks in IOMMU related code. It also finally solves the problem of Exynos DRM driver not working on ARM64 architecture, which provides noop-based DMA-mapping operations for virtual platform devices. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_drv.h')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_drv.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h
index 34a139b2fb8d..502f750bad2a 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h
@@ -219,8 +219,10 @@ struct exynos_drm_private {
struct drm_crtc *crtc[MAX_CRTC];
struct drm_property *plane_zpos_property;
+ struct device *dma_dev;
unsigned long da_start;
unsigned long da_space_size;
+ void *mapping;
unsigned int pipe;
@@ -230,6 +232,13 @@ struct exynos_drm_private {
wait_queue_head_t wait;
};
+static inline struct device *to_dma_dev(struct drm_device *dev)
+{
+ struct exynos_drm_private *priv = dev->dev_private;
+
+ return priv->dma_dev;
+}
+
/*
* Exynos drm sub driver structure.
*