aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2014-09-16 12:40:26 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-09-30 06:39:16 -0400
commitf74a289b9480648a654e5afd8458c2263c03a1e1 (patch)
tree80f1316690a2137b7461e7648039c27e3b1f5390 /drivers/video
parentc8b8888f097c7df260cf5beaf2e3a325660a16a4 (diff)
framebuffer: fix border color
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> Cc: stable@vger.kernel.org Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/console/bitblit.c3
-rw-r--r--drivers/video/console/fbcon_ccw.c3
-rw-r--r--drivers/video/console/fbcon_cw.c3
-rw-r--r--drivers/video/console/fbcon_ud.c3
4 files changed, 4 insertions, 8 deletions
diff --git a/drivers/video/console/bitblit.c b/drivers/video/console/bitblit.c
index 61b182bf32a2..dbfe4eecf12e 100644
--- a/drivers/video/console/bitblit.c
+++ b/drivers/video/console/bitblit.c
@@ -205,7 +205,6 @@ static void bit_putcs(struct vc_data *vc, struct fb_info *info,
205static void bit_clear_margins(struct vc_data *vc, struct fb_info *info, 205static void bit_clear_margins(struct vc_data *vc, struct fb_info *info,
206 int bottom_only) 206 int bottom_only)
207{ 207{
208 int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
209 unsigned int cw = vc->vc_font.width; 208 unsigned int cw = vc->vc_font.width;
210 unsigned int ch = vc->vc_font.height; 209 unsigned int ch = vc->vc_font.height;
211 unsigned int rw = info->var.xres - (vc->vc_cols*cw); 210 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,
214 unsigned int bs = info->var.yres - bh; 213 unsigned int bs = info->var.yres - bh;
215 struct fb_fillrect region; 214 struct fb_fillrect region;
216 215
217 region.color = attr_bgcol_ec(bgshift, vc, info); 216 region.color = 0;
218 region.rop = ROP_COPY; 217 region.rop = ROP_COPY;
219 218
220 if (rw && !bottom_only) { 219 if (rw && !bottom_only) {
diff --git a/drivers/video/console/fbcon_ccw.c b/drivers/video/console/fbcon_ccw.c
index 41b32ae23dac..5a3cbf6dff4d 100644
--- a/drivers/video/console/fbcon_ccw.c
+++ b/drivers/video/console/fbcon_ccw.c
@@ -197,9 +197,8 @@ static void ccw_clear_margins(struct vc_data *vc, struct fb_info *info,
197 unsigned int bh = info->var.xres - (vc->vc_rows*ch); 197 unsigned int bh = info->var.xres - (vc->vc_rows*ch);
198 unsigned int bs = vc->vc_rows*ch; 198 unsigned int bs = vc->vc_rows*ch;
199 struct fb_fillrect region; 199 struct fb_fillrect region;
200 int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
201 200
202 region.color = attr_bgcol_ec(bgshift,vc,info); 201 region.color = 0;
203 region.rop = ROP_COPY; 202 region.rop = ROP_COPY;
204 203
205 if (rw && !bottom_only) { 204 if (rw && !bottom_only) {
diff --git a/drivers/video/console/fbcon_cw.c b/drivers/video/console/fbcon_cw.c
index a93670ef7f89..e7ee44db4e98 100644
--- a/drivers/video/console/fbcon_cw.c
+++ b/drivers/video/console/fbcon_cw.c
@@ -180,9 +180,8 @@ static void cw_clear_margins(struct vc_data *vc, struct fb_info *info,
180 unsigned int bh = info->var.xres - (vc->vc_rows*ch); 180 unsigned int bh = info->var.xres - (vc->vc_rows*ch);
181 unsigned int rs = info->var.yres - rw; 181 unsigned int rs = info->var.yres - rw;
182 struct fb_fillrect region; 182 struct fb_fillrect region;
183 int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
184 183
185 region.color = attr_bgcol_ec(bgshift,vc,info); 184 region.color = 0;
186 region.rop = ROP_COPY; 185 region.rop = ROP_COPY;
187 186
188 if (rw && !bottom_only) { 187 if (rw && !bottom_only) {
diff --git a/drivers/video/console/fbcon_ud.c b/drivers/video/console/fbcon_ud.c
index ff0872c0498b..19e3714abfe8 100644
--- a/drivers/video/console/fbcon_ud.c
+++ b/drivers/video/console/fbcon_ud.c
@@ -227,9 +227,8 @@ static void ud_clear_margins(struct vc_data *vc, struct fb_info *info,
227 unsigned int rw = info->var.xres - (vc->vc_cols*cw); 227 unsigned int rw = info->var.xres - (vc->vc_cols*cw);
228 unsigned int bh = info->var.yres - (vc->vc_rows*ch); 228 unsigned int bh = info->var.yres - (vc->vc_rows*ch);
229 struct fb_fillrect region; 229 struct fb_fillrect region;
230 int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
231 230
232 region.color = attr_bgcol_ec(bgshift,vc,info); 231 region.color = 0;
233 region.rop = ROP_COPY; 232 region.rop = ROP_COPY;
234 233
235 if (rw && !bottom_only) { 234 if (rw && !bottom_only) {