summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2017-04-21 00:33:58 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2017-06-02 10:57:08 +0300
commit97817fd46518aa2f457ce41f6a9aecd36b461426 (patch)
tree5c5daa64ada96ac4be65b2e190168935d61eb973 /drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c
parent930dc19c0b7278c26c85f05f92cb417f2bd28aa3 (diff)
downloadlinux-97817fd46518aa2f457ce41f6a9aecd36b461426.tar.bz2
drm: omapdrm: Map pages for DMA in DMA_TO_DEVICE direction
The display engine only reads from memory, there's no need to use bidirectional DMA mappings. Use DMA_TO_DEVICE instead. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c b/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c
index a2b91368c0b7..6ab6f52fe31b 100644
--- a/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c
+++ b/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c
@@ -210,7 +210,7 @@ struct drm_gem_object *omap_gem_prime_import(struct drm_device *dev,
get_dma_buf(dma_buf);
- sgt = dma_buf_map_attachment(attach, DMA_BIDIRECTIONAL);
+ sgt = dma_buf_map_attachment(attach, DMA_TO_DEVICE);
if (IS_ERR(sgt)) {
ret = PTR_ERR(sgt);
goto fail_detach;
@@ -227,7 +227,7 @@ struct drm_gem_object *omap_gem_prime_import(struct drm_device *dev,
return obj;
fail_unmap:
- dma_buf_unmap_attachment(attach, sgt, DMA_BIDIRECTIONAL);
+ dma_buf_unmap_attachment(attach, sgt, DMA_TO_DEVICE);
fail_detach:
dma_buf_detach(dma_buf, attach);
dma_buf_put(dma_buf);