]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/rockchip: use drm_gem_mmap helpers
authorDaniel Kurtz <djkurtz@chromium.org>
Tue, 7 Jul 2015 09:03:36 +0000 (17:03 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Aug 2015 16:29:10 +0000 (09:29 -0700)
commitc22488876adbfca5511afed4b828407cb2556a11
treebdf5eea3fcfd5c51d111b95f64759b074e4de6ad
parent8a235410e43ae851e6657d00d3605efc7ff77f76
drm/rockchip: use drm_gem_mmap helpers

commit 41315b793e13f884cda79389f0d5d44d027e57d1 upstream.

Rather than (incompletely [0]) re-implementing drm_gem_mmap() and
drm_gem_mmap_obj() helpers, call them directly from the rockchip mmap
routines.

Once the core functions return successfully, the rockchip mmap routines
can still use dma_mmap_attrs() to simply mmap the entire buffer.

[0] Previously, we were performing the mmap() without first taking a
reference on the underlying gem buffer.  This could leak ptes if the gem
object is destroyed while userspace is still holding the mapping.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/rockchip/rockchip_drm_gem.c