aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/amba-clcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/amba-clcd.c')
-rw-r--r--drivers/video/amba-clcd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c
index 3e386fd4c5c6..321dbe91dc14 100644
--- a/drivers/video/amba-clcd.c
+++ b/drivers/video/amba-clcd.c
@@ -134,16 +134,16 @@ clcdfb_set_bitfields(struct clcd_fb *fb, struct fb_var_screeninfo *var)
134 break; 134 break;
135 case 16: 135 case 16:
136 var->red.length = 5; 136 var->red.length = 5;
137 var->green.length = 5; 137 var->green.length = 6;
138 var->blue.length = 5; 138 var->blue.length = 5;
139 if (fb->panel->cntl & CNTL_BGR) { 139 if (fb->panel->cntl & CNTL_BGR) {
140 var->red.offset = 10; 140 var->red.offset = 11;
141 var->green.offset = 5; 141 var->green.offset = 5;
142 var->blue.offset = 0; 142 var->blue.offset = 0;
143 } else { 143 } else {
144 var->red.offset = 0; 144 var->red.offset = 0;
145 var->green.offset = 5; 145 var->green.offset = 5;
146 var->blue.offset = 10; 146 var->blue.offset = 11;
147 } 147 }
148 break; 148 break;
149 case 32: 149 case 32:
@@ -256,7 +256,7 @@ clcdfb_setcolreg(unsigned int regno, unsigned int red, unsigned int green,
256 convert_bitfield(green, &fb->fb.var.green) | 256 convert_bitfield(green, &fb->fb.var.green) |
257 convert_bitfield(red, &fb->fb.var.red); 257 convert_bitfield(red, &fb->fb.var.red);
258 258
259 if (fb->fb.var.bits_per_pixel == 8 && regno < 256) { 259 if (fb->fb.fix.visual == FB_VISUAL_PSEUDOCOLOR && regno < 256) {
260 int hw_reg = CLCD_PALETTE + ((regno * 2) & ~3); 260 int hw_reg = CLCD_PALETTE + ((regno * 2) & ~3);
261 u32 val, mask, newval; 261 u32 val, mask, newval;
262 262