drm/ast: Fix HW cursor image
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 7 Oct 2014 08:04:58 +0000 (19:04 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Nov 2014 16:47:56 +0000 (08:47 -0800)
commit 1e99cfa8de0f0879091e33cd65fd60418d006ad9 upstream.

The translation from the X driver to the KMS one typo'ed a couple
of array indices, causing the HW cursor to look weird (blocky with
leaking edge colors). This fixes it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/ast/ast_mode.c

index 7fc9f7272b56e7e9ebe846b650e9e2f18f28cc5f..e8f6418b6dec9984f33eb9e9350d53255d3ff2ef 100644 (file)
@@ -1012,8 +1012,8 @@ static u32 copy_cursor_image(u8 *src, u8 *dst, int width, int height)
                        srcdata32[1].ul = *((u32 *)(srcxor + 4)) & 0xf0f0f0f0;
                        data32.b[0] = srcdata32[0].b[1] | (srcdata32[0].b[0] >> 4);
                        data32.b[1] = srcdata32[0].b[3] | (srcdata32[0].b[2] >> 4);
-                       data32.b[2] = srcdata32[0].b[1] | (srcdata32[1].b[0] >> 4);
-                       data32.b[3] = srcdata32[0].b[3] | (srcdata32[1].b[2] >> 4);
+                       data32.b[2] = srcdata32[1].b[1] | (srcdata32[1].b[0] >> 4);
+                       data32.b[3] = srcdata32[1].b[3] | (srcdata32[1].b[2] >> 4);
 
                        writel(data32.ul, dstxor);
                        csum += data32.ul;