diff options
author | Jon Medhurst <tixy@linaro.org> | 2014-03-13 11:24:30 +0000 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2014-03-31 13:58:13 +0100 |
commit | b764a2b5f6fc0a87834c20ecf358c2c3a90e2e4c (patch) | |
tree | 04afe1e64375d1324e662416937669a024e126cf /drivers/video | |
parent | 4279dae7103c09937081a5ccb82b0db4eddae25b (diff) |
amba-clcd: Hack RGB ordering in 32-bit video modes
There is confusion somewhere about RGB ordering in 32-bit video modes.
This hack get's these modes working in Linaro's ALIP and Android builds.
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/amba-clcd.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c index e30cc7a7fd4..12f8c464039 100644 --- a/drivers/video/amba-clcd.c +++ b/drivers/video/amba-clcd.c @@ -249,6 +249,17 @@ clcdfb_set_bitfields(struct clcd_fb *fb, struct fb_var_screeninfo *var) bgr = caps & CLCD_CAP_BGR && var->blue.offset == 0; rgb = caps & CLCD_CAP_RGB && var->red.offset == 0; + /* + * Seems that for 32-bit mode there is confusion about RGB + * ordering somewhere between user-side, kernel and hardware. + * The following hack seems get things working, at least on + * vexpress hardware and models... + */ + if (var->bits_per_pixel == 32) { + bgr = false; + rgb = true; + } + if (!bgr && !rgb) /* * The requested format was not possible, try just |