diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2020-07-02 13:50:21 +0200 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2020-07-07 11:11:35 +0200 |
commit | 81039adc92cd7a1eb99a6c53f33376e972d96971 (patch) | |
tree | db38f6262040744d866d6d1ce9fb489924565489 /drivers/gpu/drm/ast/ast_mode.c | |
parent | 75d9d8e66db834551e81e74e522c2900fe93ef5c (diff) |
drm/ast: Replace ast_cursor_move() with ast_cursor_show()
Having a cursor move function is misleading, as it actually enables the
cursor's image for displaying. So rename it to ast_cursor_show(). It's
semantics is to show a cursor at the specified location on the screen.
The displayed cursor is always the image in the cursor front BO.
This change also simplifies struct ast_crtc to being a mere wrapper around
around struct drm_crtc. It will be removed by a later patch.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200702115029.5281-7-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/ast/ast_mode.c')
-rw-r--r-- | drivers/gpu/drm/ast/ast_mode.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c index 32365f16c78c..b452f9e28d7c 100644 --- a/drivers/gpu/drm/ast/ast_mode.c +++ b/drivers/gpu/drm/ast/ast_mode.c @@ -661,21 +661,21 @@ ast_cursor_plane_helper_atomic_update(struct drm_plane *plane, struct drm_plane_state *old_state) { struct drm_plane_state *state = plane->state; - struct drm_crtc *crtc = state->crtc; struct drm_framebuffer *fb = state->fb; - struct ast_private *ast = to_ast_private(plane->dev); - struct ast_crtc *ast_crtc = to_ast_crtc(crtc); + struct ast_private *ast = plane->dev->dev_private; + unsigned int offset_x, offset_y; u8 jreg; - ast_crtc->offset_x = AST_MAX_HWC_WIDTH - fb->width; - ast_crtc->offset_y = AST_MAX_HWC_WIDTH - fb->height; + offset_x = AST_MAX_HWC_WIDTH - fb->width; + offset_y = AST_MAX_HWC_WIDTH - fb->height; if (state->fb != old_state->fb) { /* A new cursor image was installed. */ ast_cursor_page_flip(ast); } - ast_cursor_move(crtc, state->crtc_x, state->crtc_y); + ast_cursor_show(ast, state->crtc_x, state->crtc_y, + offset_x, offset_y); jreg = 0x2; /* enable ARGB cursor */ |