drm/ttm: add drm_gem_ttm_mmap()
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 16 Oct 2019 11:52:00 +0000 (13:52 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 17 Oct 2019 11:59:16 +0000 (13:59 +0200)
commit231927d939f073ffee24a5e7acb5b5621ba8b7c8
tree17f5e0eceee1eef90e8c8fce21b341a06814b4d5
parent12067e0e89aa296ce994299aef26eddd612cf3c4
drm/ttm: add drm_gem_ttm_mmap()

Add helper function to mmap ttm bo's using &drm_gem_object_funcs.mmap().

Note that with this code path access verification is done by
drm_gem_mmap() (which calls drm_vma_node_is_allowed(()).
The &ttm_bo_driver.verify_access() callback is is not used.

v3: use ttm_bo_mmap_obj instead of ttm_bo_mmap_vma_setup

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20191016115203.20095-9-kraxel@redhat.com
drivers/gpu/drm/drm_gem_ttm_helper.c
include/drm/drm_gem_ttm_helper.h