]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/nvd0/disp: mask off high 16 bit of negative cursor x-coordinate
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Thu, 26 Jul 2012 18:53:19 +0000 (20:53 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 12 Sep 2012 02:37:00 +0000 (03:37 +0100)
commit af5e7d84b0ec45b2b614b0d6e3657cbdceaa21f9 upstream.

Signed-off-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
[bwh: Backported to 3.2: register value is in the local 'data' variable]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/gpu/drm/nouveau/nvd0_display.c

index cb006a718e700f2c72cf06dfdac0c7f22e8cbdac..3002d8283a1aab31df67420439f7770365a95afc 100644 (file)
@@ -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);