From: Thomas Zimmermann Date: Wed, 26 Feb 2025 17:03:11 +0000 (+0100) Subject: drm/fb-dma-helper: Test for imported buffers with drm_gem_is_imported() X-Git-Tag: v6.15-rc1~120^2~13^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4972532ccda34b930004847c7aa40a078640c393;p=thirdparty%2Flinux.git drm/fb-dma-helper: 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 Reviewed-by: Anusha Srivatsa Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20250226172457.217725-9-tzimmermann@suse.de --- diff --git a/drivers/gpu/drm/drm_fb_dma_helper.c b/drivers/gpu/drm/drm_fb_dma_helper.c index e1d61a65210b0..2c4dc7ebc0c3b 100644 --- a/drivers/gpu/drm/drm_fb_dma_helper.c +++ b/drivers/gpu/drm/drm_fb_dma_helper.c @@ -178,7 +178,7 @@ int drm_fb_dma_get_scanout_buffer(struct drm_plane *plane, dma_obj = drm_fb_dma_get_gem_obj(fb, 0); /* Buffer should be accessible from the CPU */ - if (dma_obj->base.import_attach) + if (drm_gem_is_imported(&dma_obj->base)) return -ENODEV; /* Buffer should be already mapped to CPU */