OSDN Git Service

drm/cma-helper: Implement mmap as GEM CMA object functions
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 23 Nov 2020 11:56:46 +0000 (12:56 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 30 Nov 2020 12:38:27 +0000 (13:38 +0100)
commitf5ca8eb6f9bd5ea76e11bbcee09528e2d71fa920
tree0a6775c219990bd38cc8668b6bfd465810295cc3
parentbc2532ab7c20844d16c5cda97d0806eb80ab1275
drm/cma-helper: Implement mmap as GEM CMA object functions

The new GEM object function drm_gem_cma_mmap() sets the VMA flags
and offset as in the old implementation and immediately maps in the
buffer's memory pages.

Changing CMA helpers to use the GEM object function allows for the
removal of the special implementations for mmap and gem_prime_mmap
callbacks. The regular functions drm_gem_mmap() and drm_gem_prime_mmap()
are now used.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20201123115646.11004-3-tzimmermann@suse.de
drivers/gpu/drm/drm_file.c
drivers/gpu/drm/drm_gem_cma_helper.c
drivers/gpu/drm/pl111/pl111_drv.c
drivers/gpu/drm/vc4/vc4_bo.c
include/drm/drm_gem_cma_helper.h