diff options
Diffstat (limited to 'drivers/video/sa1100fb.c')
-rw-r--r-- | drivers/video/sa1100fb.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c index fad58cf9ef73..10ddad8e17d6 100644 --- a/drivers/video/sa1100fb.c +++ b/drivers/video/sa1100fb.c | |||
@@ -199,16 +199,20 @@ | |||
199 | extern void (*sa1100fb_backlight_power)(int on); | 199 | extern void (*sa1100fb_backlight_power)(int on); |
200 | extern void (*sa1100fb_lcd_power)(int on); | 200 | extern void (*sa1100fb_lcd_power)(int on); |
201 | 201 | ||
202 | /* | 202 | static struct sa1100fb_rgb rgb_4 = { |
203 | * IMHO this looks wrong. In 8BPP, length should be 8. | ||
204 | */ | ||
205 | static struct sa1100fb_rgb rgb_8 = { | ||
206 | .red = { .offset = 0, .length = 4, }, | 203 | .red = { .offset = 0, .length = 4, }, |
207 | .green = { .offset = 0, .length = 4, }, | 204 | .green = { .offset = 0, .length = 4, }, |
208 | .blue = { .offset = 0, .length = 4, }, | 205 | .blue = { .offset = 0, .length = 4, }, |
209 | .transp = { .offset = 0, .length = 0, }, | 206 | .transp = { .offset = 0, .length = 0, }, |
210 | }; | 207 | }; |
211 | 208 | ||
209 | static struct sa1100fb_rgb rgb_8 = { | ||
210 | .red = { .offset = 0, .length = 8, }, | ||
211 | .green = { .offset = 0, .length = 8, }, | ||
212 | .blue = { .offset = 0, .length = 8, }, | ||
213 | .transp = { .offset = 0, .length = 0, }, | ||
214 | }; | ||
215 | |||
212 | static struct sa1100fb_rgb def_rgb_16 = { | 216 | static struct sa1100fb_rgb def_rgb_16 = { |
213 | .red = { .offset = 11, .length = 5, }, | 217 | .red = { .offset = 11, .length = 5, }, |
214 | .green = { .offset = 5, .length = 6, }, | 218 | .green = { .offset = 5, .length = 6, }, |
@@ -613,7 +617,7 @@ sa1100fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) | |||
613 | DPRINTK("var->bits_per_pixel=%d\n", var->bits_per_pixel); | 617 | DPRINTK("var->bits_per_pixel=%d\n", var->bits_per_pixel); |
614 | switch (var->bits_per_pixel) { | 618 | switch (var->bits_per_pixel) { |
615 | case 4: | 619 | case 4: |
616 | rgbidx = RGB_8; | 620 | rgbidx = RGB_4; |
617 | break; | 621 | break; |
618 | case 8: | 622 | case 8: |
619 | rgbidx = RGB_8; | 623 | rgbidx = RGB_8; |
@@ -1382,6 +1386,7 @@ static struct sa1100fb_info * __init sa1100fb_init_fbinfo(struct device *dev) | |||
1382 | fbi->fb.monspecs = monspecs; | 1386 | fbi->fb.monspecs = monspecs; |
1383 | fbi->fb.pseudo_palette = (fbi + 1); | 1387 | fbi->fb.pseudo_palette = (fbi + 1); |
1384 | 1388 | ||
1389 | fbi->rgb[RGB_4] = &rgb_4; | ||
1385 | fbi->rgb[RGB_8] = &rgb_8; | 1390 | fbi->rgb[RGB_8] = &rgb_8; |
1386 | fbi->rgb[RGB_16] = &def_rgb_16; | 1391 | fbi->rgb[RGB_16] = &def_rgb_16; |
1387 | 1392 | ||