aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2012-07-17 13:02:09 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-08-09 11:27:50 -0400
commit4826f249d0b09bb6d8969277b43df9ffc3bccfe5 (patch)
tree6abd106dd2d804dc0b468fa0951b701dd8832e81
parent4ffd3692dd84a5979310c5e86bcf942e4b46c9ce (diff)
drm/radeon: Try harder to avoid HW cursor ending on a multiple of 128 columns.
commit f60ec4c7df043df81e62891ac45383d012afe0da upstream. This could previously fail if either of the enabled displays was using a horizontal resolution that is a multiple of 128, and only the leftmost column of the cursor was (supposed to be) visible at the right edge of that display. The solution is to move the cursor one pixel to the left in that case. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=33183 Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 3fb222615c6..72f749d56c1 100644
--- a/drivers/gpu/drm/radeon/radeon_cursor.c
+++ b/drivers/gpu/drm/radeon/radeon_cursor.c
@@ -257,8 +257,14 @@ int radeon_crtc_cursor_move(struct drm_crtc *crtc,
257 if (!(cursor_end & 0x7f)) 257 if (!(cursor_end & 0x7f))
258 w--; 258 w--;
259 } 259 }
260 if (w <= 0) 260 if (w <= 0) {
261 w = 1; 261 w = 1;
262 cursor_end = x - xorigin + w;
263 if (!(cursor_end & 0x7f)) {
264 x--;
265 WARN_ON_ONCE(x < 0);
266 }
267 }
262 } 268 }
263 } 269 }
264 270