android_kernel_samsung_msm8976/drivers/video
Takashi Iwai 4c81ba119a fbcon: Fix vc attr at deinit
commit 8aac7f34369726d1a158788ae8aff3002d5eb528 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>
Signed-off-by: Willy Tarreau <w@1wt.eu>
2019-07-27 21:44:05 +02:00
..
adf adf: Zero out the mapping data 2016-09-06 12:57:24 -07:00
aty
backlight
console fbcon: Fix vc attr at deinit 2019-07-27 21:44:05 +02:00
exynos
geode
i810
intelfb
kyro
logo video/logo: prevent use of logos after they have been freed 2015-01-27 07:52:31 -08:00
matrox
mb862xx
mbx
mmp
msm Import T813XXS2BRC2 kernel source changes 2018-05-26 00:39:42 +02:00
nvidia
omap
omap2
riva
savage
sis
vermilion
via
68328fb.c
acornfb.c
acornfb.h
amba-clcd.c
amifb.c
arcfb.c
arkfb.c
asiliantfb.c
atafb.c
atafb.h
atafb_iplan2p2.c
atafb_iplan2p4.c
atafb_iplan2p8.c
atafb_mfb.c
atafb_utils.h
atmel_lcdfb.c
au1100fb.c
au1100fb.h
au1200fb.c
au1200fb.h
auo_k190x.c
auo_k190x.h
auo_k1900fb.c
auo_k1901fb.c
bf54x-lq043fb.c
bf537-lq035.c
bfin-lq035q1-fb.c
bfin-t350mcqb-fb.c
bfin_adv7393fb.c
bfin_adv7393fb.h
broadsheetfb.c
bt431.h
bt455.h
bw2.c
c2p.h
c2p_core.h
c2p_iplan2.c
c2p_planar.c
carminefb.c
carminefb.h
carminefb_regs.h
cfbcopyarea.c
cfbfillrect.c
cfbimgblt.c
cg3.c
cg6.c
cg14.c
chipsfb.c
cirrusfb.c
clps711xfb.c
cobalt_lcdfb.c
controlfb.c
controlfb.h
cyber2000fb.c
cyber2000fb.h
da8xx-fb.c fbdev: da8xx-fb: fix videomodes of lcd panels 2016-06-07 10:42:51 +02:00
display_timing.c
dnfb.c
edid.h
efifb.c
ep93xx-fb.c
fb-puv3.c
fb_ddc.c
fb_defio.c
fb_draw.h
fb_notify.c
fb_sys_fops.c
fbcmap.c fbdev: color map copying bounds checking 2017-04-22 23:02:55 +02:00
fbcvt.c
fbmem.c fbdev: core: Initialise structure to prevent kernel information leak 2017-08-30 00:12:29 -07:00
fbmon.c
fbsysfs.c
ffb.c
fm2fb.c
fsl-diu-fb.c
g364fb.c
gbefb.c
goldfishfb.c
grvga.c
gxt4500.c
hdmi.c
hecubafb.c
hgafb.c
hitfb.c
hpfb.c
hyperv_fb.c
i740_reg.h
i740fb.c
igafb.c
imsttfb.c
imxfb.c
jz4740_fb.c
Kconfig
leo.c
macfb.c
macmodes.c
macmodes.h
Makefile
maxinefb.c
metronomefb.c
modedb.c
mx3fb.c
mxsfb.c
n411.c
neofb.c
nuc900fb.c
nuc900fb.h
of_display_timing.c
of_videomode.c
offb.c
output.c
p9100.c
platinumfb.c
platinumfb.h
pm2fb.c
pm3fb.c
pmag-aa-fb.c
pmag-ba-fb.c
pmagb-b-fb.c
ps3fb.c
pvr2fb.c
pxa3xx-gcu.c
pxa3xx-gcu.h
pxa168fb.c
pxa168fb.h
pxafb.c
pxafb.h
q40fb.c
s1d13xxxfb.c
s3c-fb.c
s3c2410fb.c
s3c2410fb.h
s3fb.c
sa1100fb.c
sa1100fb.h
sbuslib.c
sbuslib.h
sgivwfb.c
sh7760fb.c
sh_mipi_dsi.c
sh_mobile_hdmi.c
sh_mobile_lcdcfb.c
sh_mobile_lcdcfb.h
sh_mobile_meram.c
simplefb.c
skeletonfb.c
sm501fb.c
smscufx.c
ssd1307fb.c
sstfb.c
sticore.h
stifb.c
sunxvr500.c
sunxvr1000.c
sunxvr2500.c
svgalib.c
syscopyarea.c
sysfillrect.c
sysimgblt.c
tcx.c
tdfxfb.c
tgafb.c
tmiofb.c
tridentfb.c
udlfb.c
uvesafb.c
valkyriefb.c
valkyriefb.h
vesafb.c
vfb.c
vga16fb.c
vgastate.c
videomode.c
vt8500lcdfb.c
vt8500lcdfb.h
vt8623fb.c
w100fb.c
w100fb.h
wm8505fb.c
wm8505fb_regs.h
wmt_ge_rops.c
wmt_ge_rops.h
xen-fbfront.c
xilinxfb.c