Skip to content

Commit 3d672f4

Browse files
author
Thomas Zimmermann
committed
drm/gem-framebuffer: Test for imported buffers with drm_gem_is_imported()
Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. 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-7-tzimmermann@suse.de
1 parent 1a148af commit 3d672f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/drm_gem_framebuffer_helper.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ static void __drm_gem_fb_end_cpu_access(struct drm_framebuffer *fb, enum dma_dat
429429
if (!obj)
430430
continue;
431431
import_attach = obj->import_attach;
432-
if (!import_attach)
432+
if (!drm_gem_is_imported(obj))
433433
continue;
434434
ret = dma_buf_end_cpu_access(import_attach->dmabuf, dir);
435435
if (ret)
@@ -466,7 +466,7 @@ int drm_gem_fb_begin_cpu_access(struct drm_framebuffer *fb, enum dma_data_direct
466466
goto err___drm_gem_fb_end_cpu_access;
467467
}
468468
import_attach = obj->import_attach;
469-
if (!import_attach)
469+
if (!drm_gem_is_imported(obj))
470470
continue;
471471
ret = dma_buf_begin_cpu_access(import_attach->dmabuf, dir);
472472
if (ret)

0 commit comments

Comments
 (0)