From: Boris Brezillon Date: Thu, 27 Mar 2025 10:42:58 +0000 (+0100) Subject: accel/ivpu: pages_use_count is now a refcount_t X-Git-Tag: v6.16-rc1~33^2~30^2~122 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=d5d0daffccc2a1f40d90d241b53629af3a013557;p=linux-block.git accel/ivpu: pages_use_count is now a refcount_t 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 Cc: Dmitry Osipenko Cc: Jacek Lawrynowicz Cc: Maciej Falkowski Cc: Oded Gabbay Cc: dri-devel@lists.freedesktop.org Reviewed-by: Dmitry Osipenko Tested-by: Jani Nikula Signed-off-by: Dmitry Osipenko Link: https://patchwork.freedesktop.org/patch/msgid/20250327104300.1982058-1-boris.brezillon@collabora.com --- 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); }