From: Kaj-Michael Lang Date: Fri, 24 Feb 2006 21:04:15 +0000 (-0800) Subject: [PATCH] gbefb: IP32 gbefb depth change fix X-Git-Tag: v2.6.15.5~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c48cc3694e1ad82407c2aa041743f2e8fb0adcde;p=thirdparty%2Fkernel%2Fstable.git [PATCH] gbefb: IP32 gbefb depth change fix The gbefb driver does not update the framebuffer layers visual setting when depth is changed with fbset, resulting in strange colors (very dark blue in 16-bit, almost black in 24-bit). Signed-off-by: Kaj-Michael Lang Signed-off-by: Martin Michlmayr Signed-off-by: Antonino Daplas Cc: Signed-off-by: Andrew Morton Signed-off-by: Chris Wright --- diff --git a/drivers/video/gbefb.c b/drivers/video/gbefb.c index d744c51807b73..ad122726d97dd 100644 --- a/drivers/video/gbefb.c +++ b/drivers/video/gbefb.c @@ -656,12 +656,15 @@ static int gbefb_set_par(struct fb_info *info) switch (bytesPerPixel) { case 1: SET_GBE_FIELD(WID, TYP, val, GBE_CMODE_I8); + info->fix.visual = FB_VISUAL_PSEUDOCOLOR; break; case 2: SET_GBE_FIELD(WID, TYP, val, GBE_CMODE_ARGB5); + info->fix.visual = FB_VISUAL_TRUECOLOR; break; case 4: SET_GBE_FIELD(WID, TYP, val, GBE_CMODE_RGB8); + info->fix.visual = FB_VISUAL_TRUECOLOR; break; } SET_GBE_FIELD(WID, BUF, val, GBE_BMODE_BOTH);