[PATCH 00/15] drm: Do not use import_attach in drivers

Thomas Zimmermann tzimmermann at suse.de
Thu Apr 10 17:27:15 UTC 2025


Ping for additional reviews of this series.

Am 17.03.25 um 14:06 schrieb Thomas Zimmermann:
> Avoid struct drm_gem_object.import_attach in many DRM drivers that
> use it to get the object's dma-buf or test for an imported buffer.
>
> The helper drm_gem_is_imported() tests if a GEM object's buffer
> has been imported into the driver. The corresponding dma-buf is
> referenced by the object itself. Both cases avoid import_attach.
>
> The import_attach field in struct drm_gem_object is an artifact of
> the import process, but should not be used otherwise. This series
> fixes most of the drivers in the DRM misc tree. Other DRM drivers
> can be converted when drm_gem_is_imported() becomes available in
> their tree.
>
> Thomas Zimmermann (15):
>    drm/armada: Test for imported buffers with drm_gem_is_imported()
>    drm/etnaviv: Test for imported buffers with drm_gem_is_imported()
>    drm/etnaviv: Use dma_buf from GEM object instance
>    drm/exynos: Test for imported buffers with drm_gem_is_imported()
>    drm/gud: Test for imported buffers with drm_gem_is_imported()
>    drm/msm: Test for imported buffers with drm_gem_is_imported()
>    drm/omapdrm: Test for imported buffers with drm_gem_is_imported()
>    drm/panfrost: Test for imported buffers with drm_gem_is_imported()
>    drm/panthor: Test for imported buffers with drm_gem_is_imported()
>    drm/rockchip: Test for imported buffers with drm_gem_is_imported()
>    drm/vc4: Test for imported buffers with drm_gem_is_imported()
>    drm/virtio: Test for imported buffers with drm_gem_is_imported()
>    drm/vmwgfx: Test for imported buffers with drm_gem_is_imported()
>    drm/vmwgfx: Use dma_buf from GEM object instance
>    drm/xen: Test for imported buffers with drm_gem_is_imported()
>
>   drivers/gpu/drm/armada/armada_fb.c          |  2 +-
>   drivers/gpu/drm/armada/armada_gem.c         |  2 +-
>   drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c |  8 ++++----
>   drivers/gpu/drm/exynos/exynos_drm_gem.c     |  4 ++--
>   drivers/gpu/drm/gud/gud_pipe.c              |  2 +-
>   drivers/gpu/drm/msm/msm_drv.c               |  2 +-
>   drivers/gpu/drm/msm/msm_gem.c               |  4 ++--
>   drivers/gpu/drm/msm/msm_gem.h               |  2 +-
>   drivers/gpu/drm/msm/msm_gem_prime.c         |  4 ++--
>   drivers/gpu/drm/omapdrm/omap_gem.c          |  2 +-
>   drivers/gpu/drm/panfrost/panfrost_gem.c     |  2 +-
>   drivers/gpu/drm/panthor/panthor_gem.c       |  2 +-
>   drivers/gpu/drm/panthor/panthor_mmu.c       | 10 +++++-----
>   drivers/gpu/drm/rockchip/rockchip_drm_gem.c |  2 +-
>   drivers/gpu/drm/vc4/vc4_bo.c                |  2 +-
>   drivers/gpu/drm/vc4/vc4_gem.c               |  2 +-
>   drivers/gpu/drm/virtio/virtgpu_plane.c      |  8 ++++----
>   drivers/gpu/drm/vmwgfx/vmwgfx_blit.c        |  4 ++--
>   drivers/gpu/drm/vmwgfx/vmwgfx_gem.c         | 12 ++++++------
>   drivers/gpu/drm/xen/xen_drm_front_gem.c     |  2 +-
>   20 files changed, 39 insertions(+), 39 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)



More information about the dri-devel mailing list