drm/exynos: Test for imported buffers with drm_gem_is_imported()
Subsystems (3)
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.
Signed-off-by Thomas Zimmermann <[email protected]>
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
@@ -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_structstruct 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