[PATCH 0/2] drm/virtio: Avoid struct drm_gem_object.import_attach

Dmitry Osipenko dmitry.osipenko at collabora.com
Wed Apr 16 07:27:34 UTC 2025


On 4/14/25 16:11, Thomas Zimmermann wrote:
> Avoid the use of struct drm_gem_object.import_attach to get the
> object's dma-buf or test for an imported buffer. The import_attach
> field in struct drm_gem_object is an artifact of the import process,
> but should not be used otherwise.
> 
> 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.
> 
> Thomas Zimmermann (2):
>   drm/virtio: Test for imported buffers with drm_gem_is_imported()
>   drm/virtio: Use dma_buf from GEM object instance
> 
>  drivers/gpu/drm/virtio/virtgpu_plane.c | 8 ++++----
>  drivers/gpu/drm/virtio/virtgpu_prime.c | 7 +++----
>  2 files changed, 7 insertions(+), 8 deletions(-)
> 

Applied to misc-next, thanks!

-- 
Best regards,
Dmitry


More information about the dri-devel mailing list