提交 b356fe0a 编写于 作者: N Nicholas Miell 提交者: Dave Airlie

drm/radeon/kms: fix cursor image off-by-one error

The mouse cursor hotspot calculation when the cursor is partially off the
top or left side of the screen was off by one.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=41158Signed-off-by: NNicholas Miell <nmiell@gmail.com>
Reviewed-by: NMichel Dänzer <michel@daenzer.net>
Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 5ba7ddf8
......@@ -209,9 +209,9 @@ int radeon_crtc_cursor_move(struct drm_crtc *crtc,
int w = radeon_crtc->cursor_width;
if (x < 0)
xorigin = -x + 1;
xorigin = -x;
if (y < 0)
yorigin = -y + 1;
yorigin = -y;
if (xorigin >= CURSOR_WIDTH)
xorigin = CURSOR_WIDTH - 1;
if (yorigin >= CURSOR_HEIGHT)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册