Linux virtualization list
 help / color / mirror / Atom feed
* [PATCH 0/3] drm/shmem-helper: Cleanup public interface
@ 2021-11-05  9:35 Thomas Zimmermann
  2021-11-05  9:35 ` [PATCH 1/3] drm/shmem-helper: Unexport drm_gem_shmem_create_with_handle() Thomas Zimmermann
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Thomas Zimmermann @ 2021-11-05  9:35 UTC (permalink / raw)
  To: daniel, airlied, mripard, maarten.lankhorst
  Cc: Thomas Zimmermann, lima, dri-devel, virtualization

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.

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        | 126 +++++--------
 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, 251 insertions(+), 149 deletions(-)

--
2.33.1

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-11-06 19:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-05  9:35 [PATCH 0/3] drm/shmem-helper: Cleanup public interface Thomas Zimmermann
2021-11-05  9:35 ` [PATCH 1/3] drm/shmem-helper: Unexport drm_gem_shmem_create_with_handle() Thomas Zimmermann
2021-11-05  9:35 ` [PATCH 2/3] drm/shmem-helper: Export dedicated wrappers for GEM object functions Thomas Zimmermann
2021-11-05 18:18   ` Daniel Vetter
2021-11-06 19:54     ` Thomas Zimmermann
2021-11-05  9:35 ` [PATCH 3/3] drm/shmem-helper: Pass GEM shmem object in public interfaces Thomas Zimmermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox