Skip to contentSkip to conversation

drm/exynos: Test for imported buffers with drm_gem_is_imported()

PATCH New Thomas Zimmermann 1 participant 1 message Feb 27

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/exynos: 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.

Cc Inki Dae <[email protected]>
Cc Seung-Woo Kim <[email protected]>
Cc Kyungmin Park <[email protected]>
---
 drivers/gpu/drm/exynos/exynos_drm_gem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/exynos/exynos_drm_gem.c +2 -2
index 69ef6cda1ce9..ea7e26d2c84a 100644
@@ -122,7 +122,7 @@ void exynos_drm_gem_destroy(struct exynos_drm_gem *exynos_gem)
 	 * the region will be released by exporter
 	 * once dmabuf's refcount becomes 0.
 	 */
-	if (obj->import_attach)
+	if (drm_gem_is_imported(obj))
 		drm_prime_gem_destroy(obj, exynos_gem->sgt);
 	else
 		exynos_drm_free_buf(exynos_gem);
@@ -367,7 +367,7 @@ static int exynos_drm_gem_mmap(struct drm_gem_object *obj, struct vm_area_struct
 	struct exynos_drm_gem *exynos_gem = to_exynos_gem(obj);
 	int ret;
 
-	if (obj->import_attach)
+	if (drm_gem_is_imported(obj))
 		return dma_buf_mmap(obj->dma_buf, vma, 0);
 
 	vm_flags_set(vma, VM_IO | VM_DONTEXPAND | VM_DONTDUMP);
Signature · 1 line
2.52.0