From 3a2aa45eeb02023f8361df2eaab68f2461854ed0 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Thu, 6 Dec 2018 15:11:52 -0700 Subject: 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 Reviewed-on: https://review.coreboot.org/c/30092 Tested-by: build bot (Jenkins) Reviewed-by: Raul Rangel --- payloads/libpayload/drivers/video/video.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'payloads') diff --git a/payloads/libpayload/drivers/video/video.c b/payloads/libpayload/drivers/video/video.c index 71140f06ba..b932a63555 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--; -- cgit v1.2.3