]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/2.6.36.2/viafb-use-proper-register-for-colour-when-doing-fill-ops.patch
fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 2.6.36.2 / viafb-use-proper-register-for-colour-when-doing-fill-ops.patch
1 From efd4f6398dc92b5bf392670df862f42a19f34cf2 Mon Sep 17 00:00:00 2001
2 From: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
3 Date: Wed, 22 Sep 2010 02:33:52 +0000
4 Subject: viafb: use proper register for colour when doing fill ops
5
6 From: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
7
8 commit efd4f6398dc92b5bf392670df862f42a19f34cf2 upstream.
9
10 The colour was written to a wrong register for fillrect operations.
11 This sometimes caused empty console space (for example after 'clear')
12 to have a different colour than desired. Fix this by writing to the
13 correct register.
14 Many thanks to Daniel Drake and Jon Nettleton for pointing out this
15 issue and pointing me in the right direction for the fix.
16
17 Fixes http://dev.laptop.org/ticket/9323
18
19 Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
20 Cc: Joseph Chan <JosephChan@via.com.tw>
21 Cc: Daniel Drake <dsd@laptop.org>
22 Cc: Jon Nettleton <jon.nettleton@gmail.com>
23 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
24
25 ---
26 drivers/video/via/accel.c | 7 ++++---
27 1 file changed, 4 insertions(+), 3 deletions(-)
28
29 --- a/drivers/video/via/accel.c
30 +++ b/drivers/video/via/accel.c
31 @@ -283,11 +283,12 @@ static int hw_bitblt_2(void __iomem *eng
32 writel(tmp, engine + 0x1C);
33 }
34
35 - if (op != VIA_BITBLT_COLOR)
36 + if (op == VIA_BITBLT_FILL) {
37 + writel(fg_color, engine + 0x58);
38 + } else if (op == VIA_BITBLT_MONO) {
39 writel(fg_color, engine + 0x4C);
40 -
41 - if (op == VIA_BITBLT_MONO)
42 writel(bg_color, engine + 0x50);
43 + }
44
45 if (op == VIA_BITBLT_FILL)
46 ge_cmd |= fill_rop << 24 | 0x00002000 | 0x00000001;