drm/armada: Test for imported buffers with drm_gem_is_imported()
Subsystems (2)
PATCH 1/1 drm/armada: 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 <[email protected]>
Cc Russell King <[email protected]>
--- drivers/gpu/drm/armada/armada_fb.c | 2 +- drivers/gpu/drm/armada/armada_gem.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/armada/armada_fb.c +1 -1
@@ -113,7 +113,7 @@ struct drm_framebuffer *armada_fb_create(struct drm_device *dev, goto err; } -if (obj->obj.import_attach && !obj->sgt) { +if (drm_gem_is_imported (&obj->obj) && !obj->sgt) { ret =armada_gem_map_import (obj);if (ret) goto err_unref;
drivers/gpu/drm/armada/armada_gem.c +1 -1
@@ -64,7 +64,7 @@ void armada_gem_free_object(struct drm_gem_object *obj)iounmap (dobj->addr); } -if (dobj->obj.import_attach) { +if (drm_gem_is_imported (&dobj->obj)) {/* We only ever display imported data */ if (dobj->sgt) dma_buf_unmap_attachment_unlocked(dobj->obj.import_attach,
Signature · 1 line
2.52.0