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
This commit is contained in:
parent
bc2532ab7c
commit
f5ca8eb6f9
5 changed files with 44 additions and 94 deletions
|
|
@ -228,7 +228,7 @@ static const struct drm_driver pl111_drm_driver = {
|
|||
.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
|
||||
.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
|
||||
.gem_prime_import_sg_table = pl111_gem_import_sg_table,
|
||||
.gem_prime_mmap = drm_gem_cma_prime_mmap,
|
||||
.gem_prime_mmap = drm_gem_prime_mmap,
|
||||
|
||||
#if defined(CONFIG_DEBUG_FS)
|
||||
.debugfs_init = pl111_debugfs_init,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue