Skip to content

Commit

Permalink
sm501fb: RGB offsets are reversed in 16bpp modes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ville Syrjala authored and Linus Torvalds committed Mar 5, 2008
1 parent 5619d82 commit fedbb36
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/video/sm501fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fedbb36

Please sign in to comment.