aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/lima/lima_gem.c
diff options
context:
space:
mode:
authorDmitry Osipenko <[email protected]>2025-03-22 21:26:06 +0000
committerDmitry Osipenko <[email protected]>2025-03-26 20:00:19 +0000
commit051b6646d36dc974c3884d75021bf282925b171c (patch)
treee0fc362f39f22019e05d3cef30d091097776e818 /drivers/gpu/drm/lima/lima_gem.c
parentdrm/shmem-helper: Add and use pages_pin_count (diff)
downloadkernel-051b6646d36dc974c3884d75021bf282925b171c.tar.gz
kernel-051b6646d36dc974c3884d75021bf282925b171c.zip
drm/shmem-helper: Use refcount_t for pages_use_count
Use atomic refcount_t helper for pages_use_count to optimize pin/unpin functions by skipping reservation locking while GEM's pin refcount > 1. Acked-by: Maxime Ripard <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Suggested-by: Boris Brezillon <[email protected]> Acked-by: Thomas Zimmermann <[email protected]> Signed-off-by: Dmitry Osipenko <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/lima/lima_gem.c')
-rw-r--r--drivers/gpu/drm/lima/lima_gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/lima/lima_gem.c b/drivers/gpu/drm/lima/lima_gem.c
index 609221351cde..5deec673c11e 100644
--- a/drivers/gpu/drm/lima/lima_gem.c
+++ b/drivers/gpu/drm/lima/lima_gem.c
@@ -47,7 +47,7 @@ int lima_heap_alloc(struct lima_bo *bo, struct lima_vm *vm)
}
bo->base.pages = pages;
- bo->base.pages_use_count = 1;
+ refcount_set(&bo->base.pages_use_count, 1);
mapping_set_unevictable(mapping);
}