]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
lcd: restore ability to display 8 bpp BMPs on 16 bpp LCDs
authorNikita Kiryanov <nikita@compulab.co.il>
Thu, 20 Dec 2012 00:52:34 +0000 (00:52 +0000)
committerAnatolij Gustschin <agust@denx.de>
Mon, 14 Jan 2013 19:16:45 +0000 (20:16 +0100)
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>
common/lcd.c

index 4778655a26ae1982223be91014d957eee22164d6..66d4f94f9eae0dcf8e8d57f9327f29b84f67019f 100644 (file)
@@ -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));