drm/vc4: Move mmap implementation into GEM object function
authorThomas Zimmermann <tzimmermann@suse.de>
Fri, 8 Jan 2021 14:08:08 +0000 (15:08 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 13 Jan 2021 11:52:33 +0000 (12:52 +0100)
commitfa49fdbe78a5af9e438608e53ad4d7123f25bd45
treef2b330f6ae5a3f2ab3ef611d5dc6756317ccc48f
parentccfe8e9c12f9210d58dda7007b62de3fe4f96108
drm/vc4: Move mmap implementation into GEM object function

Moving vc4's mmap code from vc4_mmap() into a GEM object function
allows for the use drm_gem_mmap() and drm_gem_prime_mmap(). The content
of vc4_drm_fpos can then be generated by DEFINE_DRM_GEM_FOPS().

The actual mmap implementation is just a check if the BO is a validated
shader plus the default CMA mmap code.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210108140808.25775-4-tzimmermann@suse.de
drivers/gpu/drm/vc4/vc4_bo.c
drivers/gpu/drm/vc4/vc4_drv.c
drivers/gpu/drm/vc4/vc4_drv.h