diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2012-07-17 19:02:09 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-07-19 21:54:32 -0400 |
commit | f60ec4c7df043df81e62891ac45383d012afe0da (patch) | |
tree | 6c40ca18ce2ff7b524d3e0cc95e90b4f442a6832 /drivers/gpu/drm/radeon/radeon_cursor.c | |
parent | e811f5ae19043b2ac2c28e147a4274038e655598 (diff) | |
download | lwn-f60ec4c7df043df81e62891ac45383d012afe0da.tar.gz lwn-f60ec4c7df043df81e62891ac45383d012afe0da.zip |
drm/radeon: Try harder to avoid HW cursor ending on a multiple of 128 columns.
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
Cc: stable@vger.kernel.org
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>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_cursor.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_cursor.c | 8 |
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, if (!(cursor_end & 0x7f)) w--; } - if (w <= 0) + if (w <= 0) { w = 1; + cursor_end = x - xorigin + w; + if (!(cursor_end & 0x7f)) { + x--; + WARN_ON_ONCE(x < 0); + } + } } } |