mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 16:29:59 +00:00
drm/radeon: Simplify cursor x/yorigin calculation.
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>
This commit is contained in:
parent
b356fe0afe
commit
7d309529b4
1 changed files with 2 additions and 6 deletions
|
@ -209,13 +209,9 @@ int radeon_crtc_cursor_move(struct drm_crtc *crtc,
|
|||
int w = radeon_crtc->cursor_width;
|
||||
|
||||
if (x < 0)
|
||||
xorigin = -x;
|
||||
xorigin = min(-x, CURSOR_WIDTH - 1);
|
||||
if (y < 0)
|
||||
yorigin = -y;
|
||||
if (xorigin >= CURSOR_WIDTH)
|
||||
xorigin = CURSOR_WIDTH - 1;
|
||||
if (yorigin >= CURSOR_HEIGHT)
|
||||
yorigin = CURSOR_HEIGHT - 1;
|
||||
yorigin = min(-y, CURSOR_HEIGHT - 1);
|
||||
|
||||
if (ASIC_IS_AVIVO(rdev)) {
|
||||
int i = 0;
|
||||
|
|
Loading…
Reference in a new issue