summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/radeon_cursor.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2016-10-27 13:03:23 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-09 08:32:20 +0100
commit45ec673dfe0f8b1564289067a35f4abde3bd8472 (patch)
tree5a9544f06448be357079f1c5ffcf1da12b14249b /drivers/gpu/drm/radeon/radeon_cursor.c
parent9195157f7d03758655ea6940348152b2c563fa1a (diff)
drm/radeon: Also call cursor_move_locked when the cursor size changes
commit dcab0fa64e300afa18f39cd98d05e0950f652adf upstream. The cursor size also affects the register programming. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_cursor.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_cursor.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_cursor.c b/drivers/gpu/drm/radeon/radeon_cursor.c
index 2a10e24b34b1..99a1c8e4c7be 100644
--- a/drivers/gpu/drm/radeon/radeon_cursor.c
+++ b/drivers/gpu/drm/radeon/radeon_cursor.c
@@ -297,12 +297,11 @@ int radeon_crtc_cursor_set2(struct drm_crtc *crtc,
return ret;
}
- radeon_crtc->cursor_width = width;
- radeon_crtc->cursor_height = height;
-
radeon_lock_cursor(crtc, true);
- if (hot_x != radeon_crtc->cursor_hot_x ||
+ if (width != radeon_crtc->cursor_width ||
+ height != radeon_crtc->cursor_height ||
+ hot_x != radeon_crtc->cursor_hot_x ||
hot_y != radeon_crtc->cursor_hot_y) {
int x, y;
@@ -311,6 +310,8 @@ int radeon_crtc_cursor_set2(struct drm_crtc *crtc,
radeon_cursor_move_locked(crtc, x, y);
+ radeon_crtc->cursor_width = width;
+ radeon_crtc->cursor_height = height;
radeon_crtc->cursor_hot_x = hot_x;
radeon_crtc->cursor_hot_y = hot_y;
}