]> Gentwo Git Trees - linux/.git/commit
fbcon: Use correct erase colour for clearing in fbcon
authorZsolt Kajtar <soci@c64.rulez.org>
Sun, 2 Feb 2025 20:33:46 +0000 (21:33 +0100)
committerHelge Deller <deller@gmx.de>
Mon, 3 Feb 2025 19:40:18 +0000 (20:40 +0100)
commitc454bc71685488842e1d684b88a74aa3aa1d5ed9
treec31c9b4286eaf76e725f18270aefd66643d41938
parent6d01c35567e729189135dbd98a29087763388dca
fbcon: Use correct erase colour for clearing in fbcon

The erase colour calculation for fbcon clearing should use get_color instead
of attr_col_ec, like everything else. The latter is similar but is not correct.
For example it's missing the depth dependent remapping and doesn't care about
blanking.

The problem can be reproduced by setting up the background colour to grey
(vt.color=0x70) and having an fbcon console set to 2bpp (4 shades of gray).
Now the background attribute should be 1 (dark gray) on the console.

If the screen is scrolled when pressing enter in a shell prompt at the bottom
line then the new line is cleared using colour 7 instead of 1. That's not
something fillrect likes (at 2bbp it expect 0-3) so the result is interesting.

This patch switches to get_color with vc_video_erase_char to determine the
erase colour from attr_col_ec. That makes the latter function redundant as
no other users were left.

Use correct erase colour for clearing in fbcon

Signed-off-by: Zsolt Kajtar <soci@c64.rulez.org>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/fbdev/core/bitblit.c
drivers/video/fbdev/core/fbcon.c
drivers/video/fbdev/core/fbcon.h
drivers/video/fbdev/core/fbcon_ccw.c
drivers/video/fbdev/core/fbcon_cw.c
drivers/video/fbdev/core/fbcon_ud.c
drivers/video/fbdev/core/tileblit.c