summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2012-11-03 11:41:40 +0000
committerSimon Glass <sjg@chromium.org>2012-12-06 14:30:44 -0800
commitae63057446b8bb45c37a6ea4e5db162ba4f25c78 (patch)
treecb6bbe085947f498a25488cf0252e903bcc12990 /drivers/video
parentc94663170b6a27279d4277d42013d55d8d33a292 (diff)
downloadu-boot-imx-ae63057446b8bb45c37a6ea4e5db162ba4f25c78.zip
u-boot-imx-ae63057446b8bb45c37a6ea4e5db162ba4f25c78.tar.gz
u-boot-imx-ae63057446b8bb45c37a6ea4e5db162ba4f25c78.tar.bz2
video: Check for valid FB pointer before clearing
This command will start erasing at memory address zero if there is not a valid framebuffer address that was found during video_init(). This is a common case with Chrome OS devices in normal mode when we do not execute the video option rom in coreboot. Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/cfb_console.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 9388859..26f673a 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -2293,6 +2293,8 @@ int video_get_screen_columns(void)
void video_clear(void)
{
+ if (!video_fb_address)
+ return;
#ifdef VIDEO_HW_RECTFILL
video_hw_rectfill(VIDEO_PIXEL_SIZE, /* bytes per pixel */
0, /* dest pos x */