]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
drm/ast: Add helper to hide cursor
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 2 Jul 2020 11:50:23 +0000 (13:50 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 7 Jul 2020 09:11:44 +0000 (11:11 +0200)
As the inverse to ast_cursor_show(), ast_cursor_hide() disables the
HW cursor.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200702115029.5281-9-tzimmermann@suse.de
drivers/gpu/drm/ast/ast_cursor.c
drivers/gpu/drm/ast/ast_drv.h
drivers/gpu/drm/ast/ast_mode.c

index 8f8fdc8318307f1f09fab02a320c9cd5c73ca5e4..5421241015d6e1f2bef557dfabd29cf7799d19ad 100644 (file)
@@ -284,3 +284,8 @@ int ast_cursor_show(struct ast_private *ast, int x, int y,
 
        return 0;
 }
+
+void ast_cursor_hide(struct ast_private *ast)
+{
+       ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xcb, 0xfc, 0x00);
+}
index b00091798ef5aae059da83c2a1f16a26bb4e17d0..92af0637ac4860106f9503b4a9ebf0cb8ae9bd78 100644 (file)
@@ -321,5 +321,6 @@ int ast_cursor_blit(struct ast_private *ast, struct drm_framebuffer *fb);
 void ast_cursor_page_flip(struct ast_private *ast);
 int ast_cursor_show(struct ast_private *ast, int x, int y,
                    unsigned int offset_x, unsigned int offset_y);
+void ast_cursor_hide(struct ast_private *ast);
 
 #endif
index 5c41a91f563015232116dee69bd2b0d9b5b2d53d..8fdc4640181468e4f7e6292040326e9821550518 100644 (file)
@@ -683,7 +683,7 @@ ast_cursor_plane_helper_atomic_disable(struct drm_plane *plane,
 {
        struct ast_private *ast = to_ast_private(plane->dev);
 
-       ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xcb, 0xfc, 0x00);
+       ast_cursor_hide(ast);
 }
 
 static const struct drm_plane_helper_funcs ast_cursor_plane_helper_funcs = {