Skip to contentSkip to conversation

fbcon: Do not set palette if console is not visible

PATCH In review Antonino A. Daplas 1 participant 1 message Mar 20, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 4/7 fbcon: Do not set palette if console is not visible

A long standing bug in fbcon where switching/opening a vt will also set the palette even if the vt is in the background. This results in color corruption in the foreground vt.

From: Antonino Daplas <[email protected]>

---

 fbcon.c |    3 +++
 1 files changed, 3 insertions(+)
drivers/video/console/fbcon.c +3 -0
diff -Nru a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
@@ -2331,6 +2331,9 @@
 	if (fbcon_is_inactive(vc, info))
 		return -EINVAL;
 
+	if (!CON_IS_VISIBLE(vc))
+		return 0;
+
 	depth = fb_get_color_depth(&info->var);
 	if (depth > 3) {
 		for (i = j = 0; i < 16; i++) {

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click