From: Christoph Bumiller Date: Thu, 26 Jul 2012 18:53:19 +0000 (+0200) Subject: drm/nvd0/disp: mask off high 16 bit of negative cursor x-coordinate X-Git-Tag: v3.2.29~68 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e3b0eeb5a6bcf203635aab88111f6821d3c2a839;p=thirdparty%2Fkernel%2Fstable.git drm/nvd0/disp: mask off high 16 bit of negative cursor x-coordinate commit af5e7d84b0ec45b2b614b0d6e3657cbdceaa21f9 upstream. Signed-off-by: Christoph Bumiller Signed-off-by: Ben Skeggs [bwh: Backported to 3.2: register value is in the local 'data' variable] Signed-off-by: Ben Hutchings --- diff --git a/drivers/gpu/drm/nouveau/nvd0_display.c b/drivers/gpu/drm/nouveau/nvd0_display.c index cb006a718e700..3002d8283a1aa 100644 --- a/drivers/gpu/drm/nouveau/nvd0_display.c +++ b/drivers/gpu/drm/nouveau/nvd0_display.c @@ -472,7 +472,7 @@ static int nvd0_crtc_cursor_move(struct drm_crtc *crtc, int x, int y) { struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); - const u32 data = (y << 16) | x; + const u32 data = (y << 16) | (x & 0xffff); nv_wr32(crtc->dev, 0x64d084 + (nv_crtc->index * 0x1000), data); nv_wr32(crtc->dev, 0x64d080 + (nv_crtc->index * 0x1000), 0x00000000);