Re: [PATCH 00/10] drm: Hide import_attach from GEM code and helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Am 05.03.25 um 16:38 schrieb Christian König:
Reviewed-by: Christian König <christian.koenig@xxxxxxx> for the entire series.

Thanks. I have equivalent patches for drivers as well. I'll send them out once this series has propagated through the trees.

Best regards
Thomas


Regards,
Christian.

Am 26.02.25 um 18:03 schrieb Thomas Zimmermann:
Do not use struct drm_gem_object.import_attach unnecessarily. The
field is set by the PRIME import helpers. GEM and other helpers use
it for testing for imported dma-bufs and retrieving the respective
dma-buf instance.

Replace all tests for import_attach with the new GEM helper function
drm_gem_is_imported(). The helper avoids import_attach in favor of
testing the imported dma-buf's object against the provided GEM object.

Also replace references to import_attach.dmabuf. The imported dma-buf
is also available in the GEM object's dma_buf field.

This series cleans up the GEM core and helpers. Drivers also use
import_attach and should later be updated as well.

There's a TODO item for making import_attach entirely optional. This
series is a first step towards this goal.

Thomas Zimmermann (10):
   drm/gem: Test for imported GEM buffers with helper
   drm/gem-dma: Test for imported buffers with drm_gem_is_imported()
   drm/gem-dma: Use dma_buf from GEM object instance
   drm/gem-shmem: Test for imported buffers with drm_gem_is_imported()
   drm/gem-shmem: Use dma_buf from GEM object instance
   drm/gem-framebuffer: Test for imported buffers with
     drm_gem_is_imported()
   drm/gem-framebuffer: Use dma_buf from GEM object instance
   drm/fb-dma-helper: Test for imported buffers with
     drm_gem_is_imported()
   drm/mipi-dbi: Test for imported buffers with drm_gem_is_imported()
   drm/prime: Use dma_buf from GEM object instance

  drivers/gpu/drm/drm_fb_dma_helper.c          |  2 +-
  drivers/gpu/drm/drm_gem.c                    |  4 +--
  drivers/gpu/drm/drm_gem_dma_helper.c         |  4 +--
  drivers/gpu/drm/drm_gem_framebuffer_helper.c | 12 +++-----
  drivers/gpu/drm/drm_gem_shmem_helper.c       | 30 ++++++++++----------
  drivers/gpu/drm/drm_mipi_dbi.c               |  2 +-
  drivers/gpu/drm/drm_prime.c                  |  8 +-----
  include/drm/drm_gem.h                        | 14 +++++++++
  include/drm/drm_gem_shmem_helper.h           |  2 +-
  9 files changed, 41 insertions(+), 37 deletions(-)


--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux