+// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2015 Google, Inc
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
{
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;
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++) {
*(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) {
*(fb++) = *(bmap++);
*(fb++) = *(bmap++);
}
- fb -= lcd_line_length + width * (bpix / 8);
+ fb -= priv->line_length + width * (bpix / 8);
}
break;
#endif /* CONFIG_BMP_32BPP */