summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorNikita Kiryanov <nikita@compulab.co.il>2012-12-20 00:52:34 +0000
committerAnatolij Gustschin <agust@denx.de>2013-01-14 20:16:45 +0100
commitdad631ccf720b78201e4b026422bb347fec64f5a (patch)
tree39311e672f73f121663b597eb0a0269e93b2172a /common
parentfd70aa41468be4324275910f85578cb5be6a0439 (diff)
downloadu-boot-imx-dad631ccf720b78201e4b026422bb347fec64f5a.zip
u-boot-imx-dad631ccf720b78201e4b026422bb347fec64f5a.tar.gz
u-boot-imx-dad631ccf720b78201e4b026422bb347fec64f5a.tar.bz2
lcd: restore ability to display 8 bpp BMPs on 16 bpp LCDs
Commit fb6a9aab7ae78c (LCD: display 32bpp decompressed bitmap image) broke the check that allowed U-Boot to display 8 bpp BMPs on a 16 bpp LCD screen, effectively turning this feature off. Restore this feature by changing the check back to the same meaning it originally had. To avoid future confusion, the check has also been rephrased to make its meaning clear. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Diffstat (limited to 'common')
-rw-r--r--common/lcd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/lcd.c b/common/lcd.c
index 4778655..66d4f94 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -888,7 +888,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
}
/* We support displaying 8bpp BMPs on 16bpp LCDs */
- if (bpix != bmp_bpix && (bmp_bpix != 8 || bpix != 16 || bpix != 32)) {
+ if (bpix != bmp_bpix && !(bmp_bpix == 8 && bpix == 16)) {
printf ("Error: %d bit/pixel mode, but BMP has %d bit/pixel\n",
bpix,
le16_to_cpu(bmp->header.bit_count));