aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/radeon/radeon_cursor.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_cursor.c b/drivers/gpu/drm/radeon/radeon_cursor.c
index 42acc6449dd6..711e95ad39bf 100644
--- a/drivers/gpu/drm/radeon/radeon_cursor.c
+++ b/drivers/gpu/drm/radeon/radeon_cursor.c
@@ -262,8 +262,14 @@ int radeon_crtc_cursor_move(struct drm_crtc *crtc,
262 if (!(cursor_end & 0x7f)) 262 if (!(cursor_end & 0x7f))
263 w--; 263 w--;
264 } 264 }
265 if (w <= 0) 265 if (w <= 0) {
266 w = 1; 266 w = 1;
267 cursor_end = x - xorigin + w;
268 if (!(cursor_end & 0x7f)) {
269 x--;
270 WARN_ON_ONCE(x < 0);
271 }
272 }
267 } 273 }
268 } 274 }
269 275