[PATCH 1/3] accel/ivpu: pages_use_count is now a refcount_t

Boris Brezillon boris.brezillon at collabora.com
Thu Mar 27 10:42:58 UTC 2025


Commit 051b6646d36d ("drm/shmem-helper: Use refcount_t for
pages_use_count") changed the type of
drm_gem_shmem_object::pages_use_count but accel drivers were left
behind.

Fixes: 051b6646d36d ("drm/shmem-helper: Use refcount_t for pages_use_count")
Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
Cc: Dmitry Osipenko <dmitry.osipenko at collabora.com>
Cc: Jacek Lawrynowicz <jacek.lawrynowicz at linux.intel.com>
Cc: Maciej Falkowski <maciej.falkowski at linux.intel.com>
Cc: Oded Gabbay <ogabbay at kernel.org>
Cc: dri-devel at lists.freedesktop.org
---
 drivers/accel/ivpu/ivpu_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/accel/ivpu/ivpu_gem.c b/drivers/accel/ivpu/ivpu_gem.c
index 8741c73b92ce..09c9c5256af5 100644
--- a/drivers/accel/ivpu/ivpu_gem.c
+++ b/drivers/accel/ivpu/ivpu_gem.c
@@ -282,7 +282,7 @@ static void ivpu_gem_bo_free(struct drm_gem_object *obj)
 	ivpu_bo_unbind_locked(bo);
 	mutex_destroy(&bo->lock);
 
-	drm_WARN_ON(obj->dev, bo->base.pages_use_count > 1);
+	drm_WARN_ON(obj->dev, refcount_read(&bo->base.pages_use_count) > 1);
 	drm_gem_shmem_free(&bo->base);
 }
 
-- 
2.48.1



More information about the dri-devel mailing list