[Lima] [PATCH v2 0/3] drm/shmem-helper: Cleanup public interface
Thomas Zimmermann
tzimmermann at suse.de
Mon Nov 8 09:31:46 UTC 2021
The interface of GEM SHMEM helpers inconsistently uses either struct
drm_gem_object or drm_gem_shmem_object for the GEM object. Convert GEM
SHMEM functions to accept struct drm_gem_shmem_object, provide small
wrappers for GEM object callbacks and update all users.
Converting all GEM object functions to use drm_gem_shmem_object enables
type checking by the C compiler. Previous callers could have passed any
implementation of drm_gem_object to the GEM SHMEM helpers. It also
removes upcasting in the GEM functions and simplifies the caller side.
No functional changes.
For GEM object callbacks, the SHMEM helper library now provides a
number of small wrappers that do the necessary upcasting. Again no
functional changes.
v2:
* documentation fixes and updates (Daniel)
Thomas Zimmermann (3):
drm/shmem-helper: Unexport drm_gem_shmem_create_with_handle()
drm/shmem-helper: Export dedicated wrappers for GEM object functions
drm/shmem-helper: Pass GEM shmem object in public interfaces
drivers/gpu/drm/drm_gem_shmem_helper.c | 131 ++++++--------
drivers/gpu/drm/lima/lima_gem.c | 18 +-
drivers/gpu/drm/lima/lima_sched.c | 4 +-
drivers/gpu/drm/panfrost/panfrost_drv.c | 2 +-
drivers/gpu/drm/panfrost/panfrost_gem.c | 20 ++-
.../gpu/drm/panfrost/panfrost_gem_shrinker.c | 2 +-
drivers/gpu/drm/panfrost/panfrost_mmu.c | 5 +-
drivers/gpu/drm/panfrost/panfrost_perfcnt.c | 6 +-
drivers/gpu/drm/v3d/v3d_bo.c | 22 +--
drivers/gpu/drm/virtio/virtgpu_object.c | 27 ++-
include/drm/drm_gem_shmem_helper.h | 168 +++++++++++++++---
11 files changed, 256 insertions(+), 149 deletions(-)
base-commit: 215295e7b0a3deb2015c6d6b343b319e4f6d9a1d
--
2.33.1
More information about the lima
mailing list