]> git.sur5r.net Git - u-boot/blobdiff - drivers/video/video_bmp.c
mtd: nand: mxs_nand: add minimal ECC support
[u-boot] / drivers / video / video_bmp.c
index c9075d62dd7622049b8d929bccb71303f81f21a3..aeff65648c1a54f390c95b3d7960fa3a4ca899b8 100644 (file)
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (c) 2015 Google, Inc
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -194,7 +193,7 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y,
 {
        struct video_priv *priv = dev_get_uclass_priv(dev);
        ushort *cmap_base = NULL;
-       ushort i, j;
+       int i, j;
        uchar *fb;
        struct bmp_image *bmp = map_sysmem(bmp_image, 0);
        uchar *bmap;
@@ -312,11 +311,11 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y,
                                fb_put_word(&fb, &bmap);
 
                        bmap += (padded_width - width) * 2;
-                       fb -= width * 2 + lcd_line_length;
+                       fb -= width * 2 + priv->line_length;
                }
                break;
 #endif /* CONFIG_BMP_16BPP */
-#if defined(CONFIG_BMP_24BMP)
+#if defined(CONFIG_BMP_24BPP)
        case 24:
                for (i = 0; i < height; ++i) {
                        for (j = 0; j < width; j++) {
@@ -325,10 +324,10 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y,
                                *(fb++) = *(bmap++);
                                *(fb++) = 0;
                        }
-                       fb -= lcd_line_length + width * (bpix / 8);
+                       fb -= priv->line_length + width * (bpix / 8);
                }
                break;
-#endif /* CONFIG_BMP_24BMP */
+#endif /* CONFIG_BMP_24BPP */
 #if defined(CONFIG_BMP_32BPP)
        case 32:
                for (i = 0; i < height; ++i) {
@@ -338,7 +337,7 @@ int video_bmp_display(struct udevice *dev, ulong bmp_image, int x, int y,
                                *(fb++) = *(bmap++);
                                *(fb++) = *(bmap++);
                        }
-                       fb -= lcd_line_length + width * (bpix / 8);
+                       fb -= priv->line_length + width * (bpix / 8);
                }
                break;
 #endif /* CONFIG_BMP_32BPP */