]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
viafb: use proper register for colour when doing fill ops
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Wed, 22 Sep 2010 02:33:52 +0000 (02:33 +0000)
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Fri, 24 Sep 2010 02:15:29 +0000 (02:15 +0000)
The colour was written to a wrong register for fillrect operations.
This sometimes caused empty console space (for example after 'clear')
to have a different colour than desired. Fix this by writing to the
correct register.
Many thanks to Daniel Drake and Jon Nettleton for pointing out this
issue and pointing me in the right direction for the fix.

Fixes http://dev.laptop.org/ticket/9323

Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Daniel Drake <dsd@laptop.org>
Cc: Jon Nettleton <jon.nettleton@gmail.com>
Cc: stable@kernel.org
drivers/video/via/accel.c

index e44893ea590d9b1b2194a621d567b38b78a70364..c2f4e6e166f11508b61a46236a68fa61f66ada4f 100644 (file)
@@ -283,11 +283,12 @@ static int hw_bitblt_2(void __iomem *engine, u8 op, u32 width, u32 height,
                writel(tmp, engine + 0x1C);
        }
 
-       if (op != VIA_BITBLT_COLOR)
+       if (op == VIA_BITBLT_FILL) {
+               writel(fg_color, engine + 0x58);
+       } else if (op == VIA_BITBLT_MONO) {
                writel(fg_color, engine + 0x4C);
-
-       if (op == VIA_BITBLT_MONO)
                writel(bg_color, engine + 0x50);
+       }
 
        if (op == VIA_BITBLT_FILL)
                ge_cmd |= fill_rop << 24 | 0x00002000 | 0x00000001;