Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/vc4: 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. The test itself does not change.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Dave Stevenson <dave.stevenson@raspberrypi.com>
Cc: "Maíra Canal" <mcanal@igalia.com>
Cc: Raspberry Pi Kernel Maintenance <kernel-list@raspberrypi.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
Link: https://patch.msgid.link/20260227133113.235940-12-tzimmermann@suse.de

+2 -2
+1 -1
drivers/gpu/drm/vc4/vc4_bo.c
··· 556 556 mutex_lock(&vc4->bo_lock); 557 557 /* If the object references someone else's memory, we can't cache it. 558 558 */ 559 - if (gem_bo->import_attach) { 559 + if (drm_gem_is_imported(gem_bo)) { 560 560 vc4_bo_destroy(bo); 561 561 goto out; 562 562 }
+1 -1
drivers/gpu/drm/vc4/vc4_gem.c
··· 1250 1250 /* Not sure it's safe to purge imported BOs. Let's just assume it's 1251 1251 * not until proven otherwise. 1252 1252 */ 1253 - if (gem_obj->import_attach) { 1253 + if (drm_gem_is_imported(gem_obj)) { 1254 1254 DRM_DEBUG("madvise not supported on imported BOs\n"); 1255 1255 ret = -EINVAL; 1256 1256 goto out_put_gem;