mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 00:34:20 +08:00
sm501fb: RGB offsets are reversed in 16bpp modes
The RGB offsets were reversed in 16bpp modes. Simply trying to reverse the offsets when endianness differs is clearly the wrong thing to do but that is an issue for another patch. Signed-off-by: Ville Syrjala <syrjala@sci.fi> Acked-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
5619d823bc
commit
fedbb3625b
@ -286,13 +286,13 @@ static int sm501fb_check_var(struct fb_var_screeninfo *var,
|
||||
|
||||
case 16:
|
||||
if (sm->pdata->flags & SM501_FBPD_SWAP_FB_ENDIAN) {
|
||||
var->red.offset = 11;
|
||||
var->green.offset = 5;
|
||||
var->blue.offset = 0;
|
||||
} else {
|
||||
var->blue.offset = 11;
|
||||
var->green.offset = 5;
|
||||
var->red.offset = 0;
|
||||
} else {
|
||||
var->red.offset = 11;
|
||||
var->green.offset = 5;
|
||||
var->blue.offset = 0;
|
||||
}
|
||||
|
||||
var->red.length = 5;
|
||||
|
Loading…
Reference in New Issue
Block a user