aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntonino Daplas <adaplas@hotpop.com>2005-03-30 16:47:43 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-03-30 16:47:43 -0800
commit075f215de04547028131c425079712d4888f0d5a (patch)
tree002924d9c9bd872fbeed847e85cebdfd71ca91e8
parent92d3fa193ea4a104b5590b9687b27dbba4308c5f (diff)
downloadhistory-075f215de04547028131c425079712d4888f0d5a.tar.gz
[PATCH] 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 <adaplas@pol.net> Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/video/console/fbcon.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 5256d9b09e3e56..59e3b4b4e7e3e2 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -2331,6 +2331,9 @@ static int fbcon_set_palette(struct vc_data *vc, unsigned char *table)
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++) {