diff options
author | Martin Roth <martinroth@chromium.org> | 2018-12-06 15:11:52 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2018-12-09 09:30:13 +0000 |
commit | 3a2aa45eeb02023f8361df2eaab68f2461854ed0 (patch) | |
tree | 4fd0e93a13ab9ad30d63d9e4a21d2969345da714 /payloads/libpayload/drivers/video/video.c | |
parent | ffe4aededf4b62db3da3a61a99a3ff3d447f61e2 (diff) | |
download | coreboot-3a2aa45eeb02023f8361df2eaab68f2461854ed0.tar.gz coreboot-3a2aa45eeb02023f8361df2eaab68f2461854ed0.tar.bz2 coreboot-3a2aa45eeb02023f8361df2eaab68f2461854ed0.zip |
libpayload: Don't try to use invalid row count
console->scroll_up() was hanging when console->rows is 0. This
was happening on delan if no screen was attached. If there are no
rows, just return.
BUG=b:119234919
TEST=Boot delan with no flat panel. System boots to OS
Change-Id: Ib022d3c6fc0c9cf360809dca28761a50c787304a
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://review.coreboot.org/c/30092
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Diffstat (limited to 'payloads/libpayload/drivers/video/video.c')
-rw-r--r-- | payloads/libpayload/drivers/video/video.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/payloads/libpayload/drivers/video/video.c b/payloads/libpayload/drivers/video/video.c index 71140f06ba05..b932a635556f 100644 --- a/payloads/libpayload/drivers/video/video.c +++ b/payloads/libpayload/drivers/video/video.c @@ -87,6 +87,9 @@ static void video_console_fixup_cursor(void) cursory++; } + if (console->rows <= 0) + return; + while(cursory >= console->rows) { console->scroll_up(); cursory--; |