diff options
| author | Thomas Zimmermann <[email protected]> | 2025-06-25 08:42:18 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2025-06-30 15:55:16 +0000 |
| commit | 515986100d176663d0a03219a3056e4252f729e6 (patch) | |
| tree | cb4b6e77484590b42318a7d81cc07ff6a81d6b55 /drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | |
| parent | drm/amdgpu: Test for imported buffers with drm_gem_is_imported() (diff) | |
| download | kernel-515986100d176663d0a03219a3056e4252f729e6.tar.gz kernel-515986100d176663d0a03219a3056e4252f729e6.zip | |
drm/amdgpu: Use dma_buf from GEM object instance
Avoid dereferencing struct drm_gem_object.import_attach for the
imported dma-buf. The dma_buf field in the GEM object instance refers
to the same buffer. Prepares to make import_attach an implementation
detail of PRIME.
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Thomas Zimmermann <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c index 5743ebb2f1b7..ff98c87b2e0b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c @@ -514,7 +514,7 @@ bool amdgpu_dmabuf_is_xgmi_accessible(struct amdgpu_device *adev, return false; if (drm_gem_is_imported(obj)) { - struct dma_buf *dma_buf = obj->import_attach->dmabuf; + struct dma_buf *dma_buf = obj->dma_buf; if (dma_buf->ops != &amdgpu_dmabuf_ops) /* No XGMI with non AMD GPUs */ |
