diff options
author | 2025-02-26 18:03:09 +0100 | |
---|---|---|
committer | 2025-03-06 08:59:11 +0100 | |
commit | 3d672f483e5dc99053b9c94bd0e5f504c2e3f758 (patch) | |
tree | dbc27c08e1367d22d9b640f194a6ab41a8d0794d | |
parent | drm/gem-shmem: Use dma_buf from GEM object instance (diff) | |
download | wireguard-linux-3d672f483e5dc99053b9c94bd0e5f504c2e3f758.tar.xz wireguard-linux-3d672f483e5dc99053b9c94bd0e5f504c2e3f758.zip |
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
Diffstat (limited to '')
-rw-r--r-- | drivers/gpu/drm/drm_gem_framebuffer_helper.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_gem_framebuffer_helper.c b/drivers/gpu/drm/drm_gem_framebuffer_helper.c index 185534f56bab..2bf606ba24cd 100644 --- a/drivers/gpu/drm/drm_gem_framebuffer_helper.c +++ b/drivers/gpu/drm/drm_gem_framebuffer_helper.c @@ -429,7 +429,7 @@ static void __drm_gem_fb_end_cpu_access(struct drm_framebuffer *fb, enum dma_dat if (!obj) continue; import_attach = obj->import_attach; - if (!import_attach) + if (!drm_gem_is_imported(obj)) continue; ret = dma_buf_end_cpu_access(import_attach->dmabuf, dir); if (ret) @@ -466,7 +466,7 @@ int drm_gem_fb_begin_cpu_access(struct drm_framebuffer *fb, enum dma_data_direct goto err___drm_gem_fb_end_cpu_access; } import_attach = obj->import_attach; - if (!import_attach) + if (!drm_gem_is_imported(obj)) continue; ret = dma_buf_begin_cpu_access(import_attach->dmabuf, dir); if (ret) |