drm/omap: fix dmabuf mmap for dma_alloc'ed buffers
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 28 Feb 2017 08:11:45 +0000 (10:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2017 09:07:20 +0000 (10:07 +0100)
commit38780b9ae45a40f0f39f0279c381397fb910b072
treec91a334978abaf830e10d7b1988aaa10b3d62d37
parent8fb782bbd21214a211e8e05dd0230ddd9b255e5e
drm/omap: fix dmabuf mmap for dma_alloc'ed buffers

[ Upstream commit 9fa1d7537242bd580ffa99c4725a0407096aad26 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c