]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
framebuffer: fix border color
authorMikulas Patocka <mpatocka@redhat.com>
Tue, 16 Sep 2014 16:40:26 +0000 (12:40 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 14 Dec 2014 16:23:45 +0000 (16:23 +0000)
commit f74a289b9480648a654e5afd8458c2263c03a1e1 upstream.

The framebuffer code uses the current background color to fill the border
when switching consoles, however, this results in inconsistent behavior.
For example:
- start Midnigh Commander
- the border is black
- switch to another console and switch back
- the border is cyan
- type something into the command line in mc
- the border is cyan
- switch to another console and switch back
- the border is black
- press F9 to go to menu
- the border is black
- switch to another console and switch back
- the border is dark blue

When switching to a console with Midnight Commander, the border is random
color that was left selected by the slang subsystem.

This patch fixes this inconsistency by always using black as the
background color when switching consoles.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/video/console/bitblit.c
drivers/video/console/fbcon_ccw.c
drivers/video/console/fbcon_cw.c
drivers/video/console/fbcon_ud.c

index 28b1a834906b1f59d31c49421e771aa5e6f8aae7..6cbb2069531df76fb126ff97233fd543048b5923 100644 (file)
@@ -205,7 +205,6 @@ static void bit_putcs(struct vc_data *vc, struct fb_info *info,
 static void bit_clear_margins(struct vc_data *vc, struct fb_info *info,
                              int bottom_only)
 {
-       int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
        unsigned int cw = vc->vc_font.width;
        unsigned int ch = vc->vc_font.height;
        unsigned int rw = info->var.xres - (vc->vc_cols*cw);
@@ -214,7 +213,7 @@ static void bit_clear_margins(struct vc_data *vc, struct fb_info *info,
        unsigned int bs = info->var.yres - bh;
        struct fb_fillrect region;
 
-       region.color = attr_bgcol_ec(bgshift, vc, info);
+       region.color = 0;
        region.rop = ROP_COPY;
 
        if (rw && !bottom_only) {
index 41b32ae23dacb9f3dac50a52066ef5f276729d2c..5a3cbf6dff4d944ff5a0ac3fb1fd62c2fba3106a 100644 (file)
@@ -197,9 +197,8 @@ static void ccw_clear_margins(struct vc_data *vc, struct fb_info *info,
        unsigned int bh = info->var.xres - (vc->vc_rows*ch);
        unsigned int bs = vc->vc_rows*ch;
        struct fb_fillrect region;
-       int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
 
-       region.color = attr_bgcol_ec(bgshift,vc,info);
+       region.color = 0;
        region.rop = ROP_COPY;
 
        if (rw && !bottom_only) {
index 6a737827beb1ca247ec54cbc8dde9536b876ba0b..7d3fd9bda66c7591b205a7fe1dd098f1dc1e9bd3 100644 (file)
@@ -181,9 +181,8 @@ static void cw_clear_margins(struct vc_data *vc, struct fb_info *info,
        unsigned int bh = info->var.xres - (vc->vc_rows*ch);
        unsigned int rs = info->var.yres - rw;
        struct fb_fillrect region;
-       int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
 
-       region.color = attr_bgcol_ec(bgshift,vc,info);
+       region.color = 0;
        region.rop = ROP_COPY;
 
        if (rw && !bottom_only) {
index ff0872c0498bd6e32bdb22b6a91f55f40796e7ef..19e3714abfe8fb765eaaea2ebeb9a21c5c2725de 100644 (file)
@@ -227,9 +227,8 @@ static void ud_clear_margins(struct vc_data *vc, struct fb_info *info,
        unsigned int rw = info->var.xres - (vc->vc_cols*cw);
        unsigned int bh = info->var.yres - (vc->vc_rows*ch);
        struct fb_fillrect region;
-       int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
 
-       region.color = attr_bgcol_ec(bgshift,vc,info);
+       region.color = 0;
        region.rop = ROP_COPY;
 
        if (rw && !bottom_only) {