* [U-Boot] [PATCH] video: bmp: Fix compilation errors with CONFIG_BMP_xxBPP enabled
@ 2016-11-12 9:32 Stefan Roese
2016-11-12 20:24 ` Anatolij Gustschin
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Roese @ 2016-11-12 9:32 UTC (permalink / raw)
To: u-boot
Compiling the 'bmp' command with DM and having one of the following macros
enabled:
CONFIG_BMP_16BPP, CONFIG_BMP_24BPP ONFIG_BMP_32BPP
generates this error:
drivers/video/video_bmp.c: In function ?video_bmp_display?:
drivers/video/video_bmp.c:315:22: error: ?lcd_line_length? undeclared (first use in this function)
fb -= width * 2 + lcd_line_length;
^
This patch moves to using the correct variable instead and enables the
'bmp' command for DM again.
Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Anatolij Gustschin <agust@denx.de>
---
drivers/video/video_bmp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/video/video_bmp.c b/drivers/video/video_bmp.c
index fb7943e..32a4e7f 100644
--- a/drivers/video/video_bmp.c
+++ b/drivers/video/video_bmp.c
@@ -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 */
--
2.10.2
^ permalink raw reply related [flat|nested] 2+ messages in thread* [U-Boot] [PATCH] video: bmp: Fix compilation errors with CONFIG_BMP_xxBPP enabled
2016-11-12 9:32 [U-Boot] [PATCH] video: bmp: Fix compilation errors with CONFIG_BMP_xxBPP enabled Stefan Roese
@ 2016-11-12 20:24 ` Anatolij Gustschin
0 siblings, 0 replies; 2+ messages in thread
From: Anatolij Gustschin @ 2016-11-12 20:24 UTC (permalink / raw)
To: u-boot
On Sat, 12 Nov 2016 10:32:38 +0100
Stefan Roese sr at denx.de wrote:
> Compiling the 'bmp' command with DM and having one of the following macros
> enabled:
>
> CONFIG_BMP_16BPP, CONFIG_BMP_24BPP ONFIG_BMP_32BPP
>
> generates this error:
>
> drivers/video/video_bmp.c: In function ?video_bmp_display?:
> drivers/video/video_bmp.c:315:22: error: ?lcd_line_length? undeclared (first use in this function)
> fb -= width * 2 + lcd_line_length;
> ^
>
> This patch moves to using the correct variable instead and enables the
> 'bmp' command for DM again.
>
> Signed-off-by: Stefan Roese <sr@denx.de>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Anatolij Gustschin <agust@denx.de>
> ---
> drivers/video/video_bmp.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Applied to u-boot-video/master. Thanks!
--
Anatolij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-12 20:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-12 9:32 [U-Boot] [PATCH] video: bmp: Fix compilation errors with CONFIG_BMP_xxBPP enabled Stefan Roese
2016-11-12 20:24 ` Anatolij Gustschin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox