drm/msm: Initialize mmap offset after constructing the buffer object
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 13 Jun 2023 14:51:32 +0000 (16:51 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 19 Jun 2023 11:56:32 +0000 (13:56 +0200)
commit734458b7620161c07acb801a396d0a4837bcdbd9
tree41c297fea30765ebdbb8320c24fce8164cf907d3
parenta74e041deffebddbd547abc6c463e4bbbaee14f9
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
drivers/gpu/drm/msm/msm_gem.c
drivers/gpu/drm/msm/msm_gem_prime.c