Commit abe54e54 authored by Thomas Zimmermann's avatar Thomas Zimmermann

drm/ast: Don't pin cursor source BO explicitly during update

Vmapping the cursor source BO contains an implicit pin operation,
so there's no need to do this manually.
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20201209142527.26415-2-tzimmermann@suse.de
parent c365d304
......@@ -180,12 +180,9 @@ int ast_cursor_blit(struct ast_private *ast, struct drm_framebuffer *fb)
gbo = drm_gem_vram_of_gem(fb->obj[0]);
ret = drm_gem_vram_pin(gbo, 0);
if (ret)
return ret;
ret = drm_gem_vram_vmap(gbo, &map);
if (ret)
goto err_drm_gem_vram_unpin;
return ret;
src = map.vaddr; /* TODO: Use mapping abstraction properly */
dst = ast->cursor.map[ast->cursor.next_index].vaddr_iomem;
......@@ -194,13 +191,8 @@ int ast_cursor_blit(struct ast_private *ast, struct drm_framebuffer *fb)
update_cursor_image(dst, src, fb->width, fb->height);
drm_gem_vram_vunmap(gbo, &map);
drm_gem_vram_unpin(gbo);
return 0;
err_drm_gem_vram_unpin:
drm_gem_vram_unpin(gbo);
return ret;
}
static void ast_cursor_set_base(struct ast_private *ast, u64 address)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment