Skip to content

drm/amdgpu: Avoid struct drm_gem_object.import_attach

Thomas Zimmermann amd-gfx dri-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm/amdgpu: Test for imported buffers with drm_gem_is_imported()drivers/gpu/drm/amd/amdgpu/amdgpu_display.c drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +3 more+13 -150 replies
2/2drm/amdgpu: Use dma_buf from GEM object instancedrivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c+3 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] drm/amdgpu: Avoid struct drm_gem_object.import_attach

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/amdgpu: Test for imported buffers with drm_gem_is_imported() drm/amdgpu: Use dma_buf from GEM object instance

 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c |  4 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c     |  5 ++---
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c  | 14 ++++++--------
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c     |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c      |  6 +++---
 6 files changed, 15 insertions(+), 18 deletions(-)
Signature · 1 line
2.49.0