Instead of testing import_attach for imported GEM buffers, invoke drm_gem_is_imported() to do the test. The helper tests the dma_buf itself while import_attach is just an artifact of the import. Prepares to make import_attach optional. Signed-off-by: Thomas Zimmermann <tzimmermann@xxxxxxx> --- drivers/gpu/drm/gud/gud_pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/gud/gud_pipe.c b/drivers/gpu/drm/gud/gud_pipe.c index e163649816d5..99b34158afb3 100644 --- a/drivers/gpu/drm/gud/gud_pipe.c +++ b/drivers/gpu/drm/gud/gud_pipe.c @@ -443,7 +443,7 @@ static void gud_fb_handle_damage(struct gud_device *gdrm, struct drm_framebuffer } /* Imported buffers are assumed to be WriteCombined with uncached reads */ - gud_flush_damage(gdrm, fb, src, !fb->obj[0]->import_attach, damage); + gud_flush_damage(gdrm, fb, src, !drm_gem_is_imported(fb->obj[0]), damage); } int gud_pipe_check(struct drm_simple_display_pipe *pipe, -- 2.48.1