drm/exynos: fix imported dma-buf to be mapped
authorJoonyoung Shim <jy0922.shim@samsung.com>
Fri, 22 Apr 2016 07:30:48 +0000 (16:30 +0900)
committerInki Dae <daeinki@gmail.com>
Tue, 10 May 2016 14:11:43 +0000 (23:11 +0900)
The imported dma-buf should be mapped by sub-system exporting it.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_gem.c

index 9f688c28fa8e9e9f24afd3b8530be85b8f5fb55e..6c83884f1fe6ba6f2b3ed715efa159c65a835b8a 100644 (file)
@@ -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);
 }