linux-imx/drivers/video/console
Takashi Iwai 3fc017fe55 fbcon: Fix vc attr at deinit
commit 8aac7f3436 upstream.

fbcon can deal with vc_hi_font_mask (the upper 256 chars) and adjust
the vc attrs dynamically when vc_hi_font_mask is changed at
fbcon_init().  When the vc_hi_font_mask is set, it remaps the attrs in
the existing console buffer with one bit shift up (for 9 bits), while
it remaps with one bit shift down (for 8 bits) when the value is
cleared.  It works fine as long as the font gets updated after fbcon
was initialized.

However, we hit a bizarre problem when the console is switched to
another fb driver (typically from vesafb or efifb to drmfb).  At
switching to the new fb driver, we temporarily rebind the console to
the dummy console, then rebind to the new driver.  During the
switching, we leave the modified attrs as is.  Thus, the new fbcon
takes over the old buffer as if it were to contain 8 bits chars
(although the attrs are still shifted for 9 bits), and effectively
this results in the yellow color texts instead of the original white
color, as found in the bugzilla entry below.

An easy fix for this is to re-adjust the attrs before leaving the
fbcon at con_deinit callback.  Since the code to adjust the attrs is
already present in the current fbcon code, in this patch, we simply
factor out the relevant code, and call it from fbcon_deinit().

Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1000619
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
2017-04-07 10:38:28 +02:00
..
bitblit.c framebuffer: fix border color 2014-11-13 19:02:22 +01:00
dummycon.c
fbcon_ccw.c framebuffer: fix border color 2014-11-13 19:02:22 +01:00
fbcon_cw.c framebuffer: fix border color 2014-11-13 19:02:22 +01:00
fbcon_rotate.c
fbcon_rotate.h
fbcon_ud.c framebuffer: fix border color 2014-11-13 19:02:22 +01:00
fbcon.c fbcon: Fix vc attr at deinit 2017-04-07 10:38:28 +02:00
fbcon.h fb: add hooks to handle KDB enter/exit 2010-08-05 09:22:31 -05:00
Kconfig video: vgacon: Don't build on arm64 2015-04-22 08:58:49 +02:00
Makefile lib: Move fonts from drivers/video/console/ to lib/fonts/ 2013-06-28 10:28:22 +02:00
mdacon.c TTY:vt: convert remain take_over_console's users to do_take_over_console 2013-05-20 22:29:27 -07:00
newport_con.c TTY:vt: convert remain take_over_console's users to do_take_over_console 2013-05-20 22:29:27 -07:00
softcursor.c drivers/video/console/softcursor.c: remove redundant NULL check before kfree() 2012-12-10 11:33:53 +02:00
sticon.c TTY:vt: convert remain take_over_console's users to do_take_over_console 2013-05-20 22:29:27 -07:00
sticore.c parisc: sticon - unbreak on 64bit kernel 2013-12-04 11:05:04 -08:00
tileblit.c fbcon: Bugfix soft cursor detection in Tile Blitting 2011-03-22 16:41:08 +09:00
vgacon.c vgacon: fix missing include. 2013-06-27 10:08:04 +10:00