stm32f7: sdram: correct sdram configuration as per micron sdram
[oweals/u-boot.git] / drivers / video / video_bmp.c
index c9075d62dd7622049b8d929bccb71303f81f21a3..32a4e7f8a90e6b3f670330880a1fca574bdef9b1 100644 (file)
@@ -194,7 +194,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,7 +312,7 @@ 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 */
@@ -325,7 +325,7 @@ 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 */
@@ -338,7 +338,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 */