Skip to content

Commit 1e99cfa

Browse files
ozbenhairlied
authored andcommitted
drm/ast: Fix HW cursor image
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> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
1 parent 46d987a commit 1e99cfa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/gpu/drm/ast/ast_mode.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,8 +1104,8 @@ static u32 copy_cursor_image(u8 *src, u8 *dst, int width, int height)
11041104
srcdata32[1].ul = *((u32 *)(srcxor + 4)) & 0xf0f0f0f0;
11051105
data32.b[0] = srcdata32[0].b[1] | (srcdata32[0].b[0] >> 4);
11061106
data32.b[1] = srcdata32[0].b[3] | (srcdata32[0].b[2] >> 4);
1107-
data32.b[2] = srcdata32[0].b[1] | (srcdata32[1].b[0] >> 4);
1108-
data32.b[3] = srcdata32[0].b[3] | (srcdata32[1].b[2] >> 4);
1107+
data32.b[2] = srcdata32[1].b[1] | (srcdata32[1].b[0] >> 4);
1108+
data32.b[3] = srcdata32[1].b[3] | (srcdata32[1].b[2] >> 4);
11091109

11101110
writel(data32.ul, dstxor);
11111111
csum += data32.ul;

0 commit comments

Comments
 (0)