diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2023-06-13 17:51:32 +0300 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2023-06-19 14:56:32 +0300 |
commit | 734458b7620161c07acb801a396d0a4837bcdbd9 (patch) | |
tree | 41c297fea30765ebdbb8320c24fce8164cf907d3 /drivers/gpu/drm/msm/msm_gem_prime.c | |
parent | a74e041deffebddbd547abc6c463e4bbbaee14f9 (diff) | |
download | linux-734458b7620161c07acb801a396d0a4837bcdbd9.tar.xz |
drm/msm: Initialize mmap offset after constructing the buffer object
Only the msm driver provides its own implementation of gem_prime_mmap
from struct drm_driver. All other drivers use the drm_gem_prime_mmap()
helper.
Initialize the mmap offset when constructing the buffer object in msm
and reduce the gem_prime_mmap code to the generic helper. Prepares
msm for the removal of struct drm_driver.gem_prime_mmap.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230613150441.17720-2-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gem_prime.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gem_prime.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem_prime.c b/drivers/gpu/drm/msm/msm_gem_prime.c index c1d91863df05..2c846afe049e 100644 --- a/drivers/gpu/drm/msm/msm_gem_prime.c +++ b/drivers/gpu/drm/msm/msm_gem_prime.c @@ -13,16 +13,6 @@ int msm_gem_prime_mmap(struct drm_gem_object *obj, struct vm_area_struct *vma) { - int ret; - - /* Ensure the mmap offset is initialized. We lazily initialize it, - * so if it has not been first mmap'd directly as a GEM object, the - * mmap offset will not be already initialized. - */ - ret = drm_gem_create_mmap_offset(obj); - if (ret) - return ret; - return drm_gem_prime_mmap(obj, vma); } |