drm/radeon: Try harder to avoid HW cursor ending on a multiple of 128 columns.
Subsystems (2)
PATCH 1/2 drm/radeon: Try harder to avoid HW cursor ending on a multiple of 128 columns.
From: Michel Dänzer <[email protected]>
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
--- drivers/gpu/drm/radeon/radeon_cursor.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/radeon/radeon_cursor.c +7 -1
@@ -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 ); + } + } } }
Signature · 6 lines
1.7.10 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Ignore the 1/2, there's no second patch.
Signature · 2 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Debian, X and DRI developer
Quoted 6 lines · Michel Dänzer
From: Michel Dänzer <[email protected]>
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.
Quoted 6 lines
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 <[email protected]>
Quoted 31 lines
--- drivers/gpu/drm/radeon/radeon_cursor.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)drivers/gpu/drm/radeon/radeon_cursor.c +7
-2@@ -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 ); + } + } } } --1.7.10
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 7 lines · Alex Deucher
Quoted 6 lines · Michel Dänzer
From: Michel Dänzer <[email protected]>
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.
Quoted 9 lines
Quoted 6 lines
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 <[email protected]>Reviewed-by Alex Deucher <[email protected]>
Applied to -next,
Thanks,
Dave.