[PATCH 2/2] drm/exynos: fix imported dma-buf to be mapped

Joonyoung Shim jy0922.shim at samsung.com
Fri Apr 22 07:30:48 UTC 2016


The imported dma-buf should be mapped by sub-system exporting it.

Signed-off-by: Joonyoung Shim <jy0922.shim at samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_gem.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers/gpu/drm/exynos/exynos_drm_gem.c
index 9f688c28fa8e..6c83884f1fe6 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gem.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_gem.c
@@ -547,6 +547,9 @@ int exynos_drm_gem_mmap(struct file *filp, struct vm_area_struct *vma)
 
 	obj = vma->vm_private_data;
 
+	if (obj->import_attach)
+		return dma_buf_mmap(obj->dma_buf, vma, 0);
+
 	return exynos_drm_gem_mmap_obj(obj, vma);
 }
 
-- 
1.9.1



More information about the dri-devel mailing list