drm/vgem: Fix mmaping
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 23 Jun 2016 14:35:32 +0000 (15:35 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 12 Jul 2016 10:41:36 +0000 (12:41 +0200)
commit5ba6c9ff961a79809ec0daf2713e8d39e3f77199
tree9c2eb224abb10f2168e627f5243e2c8d4c461007
parent2ae995887830b335f9bdab3040018071da54bcdb
drm/vgem: Fix mmaping

The vGEM mmap code has bitrotted slightly and now immediately BUGs.
Since vGEM was last updated, there are new core GEM facilities to
provide more common functions, so let's use those here.

v2: drm_gem_free_mmap_offset() is performed from
drm_gem_object_release() so we can remove the redundant call.

Testcase: igt/vgem_basic/mmap
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96603
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: Zach Reizner <zachr@google.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Tested-by: Humberto Israel Perez Rodriguez <humberto.i.perez.rodriguez@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1466692534-28303-1-git-send-email-chris@chris-wilson.co.uk
drivers/gpu/drm/vgem/vgem_drv.c
drivers/gpu/drm/vgem/vgem_drv.h