Skip to content

drm: Hide import_attach from GEM code and helpers

Thomas Zimmermann dri-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 15 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10drm/gem: Test for imported GEM buffers with helperdrivers/gpu/drm/drm_gem.c include/drm/drm_gem.h+16 -22 replies
2/10drm/gem-dma: Test for imported buffers with drm_gem_is_imported()drivers/gpu/drm/drm_gem_dma_helper.c+1 -11 reply
3/10drm/gem-dma: Use dma_buf from GEM object instancedrivers/gpu/drm/drm_gem_dma_helper.c+1 -11 reply
4/10drm/gem-shmem: Test for imported buffers with drm_gem_is_imported()drivers/gpu/drm/drm_gem_shmem_helper.c include/drm/drm_gem_shmem_helper.h+13 -131 reply
5/10drm/gem-shmem: Use dma_buf from GEM object instancedrivers/gpu/drm/drm_gem_shmem_helper.c+3 -33 replies
6/10drm/gem-framebuffer: Test for imported buffers with drm_gem_is_imported()drivers/gpu/drm/drm_gem_framebuffer_helper.c+2 -21 reply
7/10drm/gem-framebuffer: Use dma_buf from GEM object instancedrivers/gpu/drm/drm_gem_framebuffer_helper.c+2 -61 reply
8/10drm/fb-dma-helper: Test for imported buffers with drm_gem_is_imported()drivers/gpu/drm/drm_fb_dma_helper.c+1 -11 reply
9/10drm/mipi-dbi: Test for imported buffers with drm_gem_is_imported()drivers/gpu/drm/drm_mipi_dbi.c+1 -11 reply
10/10drm/prime: Use dma_buf from GEM object instancedrivers/gpu/drm/drm_prime.c+1 -71 reply

Reviews trailers per patch

9 of 10 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAnusha SrivatsaChristian König
SeriesR-b
1/10R-b
2/10R-b
3/10R-b
4/10
5/10R-b
6/10R-b
7/10R-b
8/10R-b
9/10R-b
10/10R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

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

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(-)
Signature · 1 line
2.48.1