@@ -254,8 +254,8 @@ void ast_cursor_show(struct ast_private *ast, int x, int y,
u8 jreg;
int ret;
- ret = drm_gem_vram_vmap(gbo, &map);
- if (drm_WARN_ONCE(dev, ret, "drm_gem_vram_vmap() failed, ret=%d\n", ret))
+ ret = drm_gem_vram_vmap_unlocked(gbo, &map, NULL);
+ if (drm_WARN_ONCE(dev, ret, "drm_gem_vram_vmap_unlocked() failed, ret=%d\n", ret))
return;
dst = map.vaddr_iomem; /* TODO: Use mapping abstraction properly */
@@ -263,7 +263,7 @@ void ast_cursor_show(struct ast_private *ast, int x, int y,
writel(x, sig + AST_HWC_SIGNATURE_X);
writel(y, sig + AST_HWC_SIGNATURE_Y);
- drm_gem_vram_vunmap(gbo, &map);
+ drm_gem_vram_vunmap_unlocked(gbo, &map);
if (x < 0) {
x_offset = (-x) + offset_x;
This change avoids to pin the source BO when showing the cursor, and instead acquires the BO's reservation lock. Prevents concurrent access during the buffer update. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> --- drivers/gpu/drm/ast/ast_cursor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)