Skip to content

Commit e8afa15

Browse files
author
Thomas Zimmermann
committed
drm/gem-dma: 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 optional. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Anusha Srivatsa <asrivats@redhat.com> Reviewed-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250226172457.217725-4-tzimmermann@suse.de
1 parent 3f0e026 commit e8afa15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/drm_gem_dma_helper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ void drm_gem_dma_free(struct drm_gem_dma_object *dma_obj)
230230

231231
if (drm_gem_is_imported(gem_obj)) {
232232
if (dma_obj->vaddr)
233-
dma_buf_vunmap_unlocked(gem_obj->import_attach->dmabuf, &map);
233+
dma_buf_vunmap_unlocked(gem_obj->dma_buf, &map);
234234
drm_prime_gem_destroy(gem_obj, dma_obj->sgt);
235235
} else if (dma_obj->vaddr) {
236236
if (dma_obj->map_noncoherent)

0 commit comments

Comments
 (0)