From: Karol Wachowski Date: Mon, 9 Mar 2026 09:27:55 +0000 (+0100) Subject: accel/ivpu: Test for imported buffers with drm_gem_is_imported() X-Git-Tag: v7.1-rc1~167^2~28^2~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=153308a2f966adc7d1e72cad5557d621708a3a18;p=thirdparty%2Flinux.git accel/ivpu: 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. Suggested-by: Thomas Zimmermann Reviewed-by: Thomas Zimmermann Signed-off-by: Karol Wachowski Link: https://patch.msgid.link/20260309092755.3165130-1-karol.wachowski@linux.intel.com --- diff --git a/drivers/accel/ivpu/ivpu_gem.c b/drivers/accel/ivpu/ivpu_gem.c index 98b9ce26962b1..8009965286e0a 100644 --- a/drivers/accel/ivpu/ivpu_gem.c +++ b/drivers/accel/ivpu/ivpu_gem.c @@ -48,7 +48,7 @@ static struct sg_table *ivpu_bo_map_attachment(struct ivpu_device *vdev, struct { struct sg_table *sgt; - drm_WARN_ON(&vdev->drm, !bo->base.base.import_attach); + drm_WARN_ON(&vdev->drm, !drm_gem_is_imported(&bo->base.base)); ivpu_bo_lock(bo); @@ -157,7 +157,7 @@ static void ivpu_bo_unbind_locked(struct ivpu_bo *bo) } if (bo->base.sgt) { - if (bo->base.base.import_attach) { + if (drm_gem_is_imported(&bo->base.base)) { dma_buf_unmap_attachment(bo->base.base.import_attach, bo->base.sgt, DMA_BIDIRECTIONAL); } else {