Skip to content

Commit b321283

Browse files
Michel Dänzergregkh
authored andcommitted
drm/radeon: Use mode h/vdisplay fields to hide out of bounds HW cursor
commit d74c67dd7800fc7aae381f272875c337f268806c upstream. The crtc_h/vdisplay fields may not match the CRTC viewport dimensions with special modes such as interlaced ones. Fixes the HW cursor disappearing in the bottom half of the screen with interlaced modes. Fixes: 6b16cf7785a4 ("drm/radeon: Hide the HW cursor while it's out of bounds") Reported-by: Ashutosh Kumar <ashutosh.kumar@amd.com> Tested-by: Sonny Jiang <sonny.jiang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c6cbae4 commit b321283

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/gpu/drm/radeon/radeon_cursor.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ static int radeon_cursor_move_locked(struct drm_crtc *crtc, int x, int y)
205205
}
206206

207207
if (x <= (crtc->x - w) || y <= (crtc->y - radeon_crtc->cursor_height) ||
208-
x >= (crtc->x + crtc->mode.crtc_hdisplay) ||
209-
y >= (crtc->y + crtc->mode.crtc_vdisplay))
208+
x >= (crtc->x + crtc->mode.hdisplay) ||
209+
y >= (crtc->y + crtc->mode.vdisplay))
210210
goto out_of_bounds;
211211

212212
x += xorigin;

0 commit comments

Comments
 (0)