diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2017-02-28 03:11:45 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2017-03-13 06:53:27 -0400 |
commit | 9fa1d7537242bd580ffa99c4725a0407096aad26 (patch) | |
tree | a6faee3b35082142ba261bbe071f93a3ef762691 | |
parent | 3f81e1340706e9a7f854808e2f580c3106805d0c (diff) |
drm/omap: fix dmabuf mmap for dma_alloc'ed buffers
omap_gem_dmabuf_mmap() returns an error (with a WARN) when called for a
buffer which is allocated with dma_alloc_*(). This prevents dmabuf mmap
from working on SoCs without DMM, e.g. AM4 and OMAP3.
I could not find any reason for omap_gem_dmabuf_mmap() rejecting such
buffers, and just removing the if() fixes the limitation.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c b/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c index af267c35d813..ee5883f59be5 100644 --- a/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c +++ b/drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | |||
@@ -147,9 +147,6 @@ static int omap_gem_dmabuf_mmap(struct dma_buf *buffer, | |||
147 | struct drm_gem_object *obj = buffer->priv; | 147 | struct drm_gem_object *obj = buffer->priv; |
148 | int ret = 0; | 148 | int ret = 0; |
149 | 149 | ||
150 | if (WARN_ON(!obj->filp)) | ||
151 | return -EINVAL; | ||
152 | |||
153 | ret = drm_gem_mmap_obj(obj, omap_gem_mmap_size(obj), vma); | 150 | ret = drm_gem_mmap_obj(obj, omap_gem_mmap_size(obj), vma); |
154 | if (ret < 0) | 151 | if (ret < 0) |
155 | return ret; | 152 | return ret; |