[coreboot-gerrit] Change in ...coreboot[master]: libpayload: Don't try to use invalid row count

Patrick Georgi (Code Review) gerrit at coreboot.org
Sun Dec 9 10:30:16 CET 2018


Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/30092 )

Change subject: libpayload: Don't try to use invalid row count
......................................................................

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 at chromium.org>
Reviewed-on: https://review.coreboot.org/c/30092
Tested-by: build bot (Jenkins) <no-reply at coreboot.org>
Reviewed-by: Raul Rangel <rrangel at chromium.org>
---
M payloads/libpayload/drivers/video/video.c
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  build bot (Jenkins): Verified
  Raul Rangel: Looks good to me, approved



diff --git a/payloads/libpayload/drivers/video/video.c b/payloads/libpayload/drivers/video/video.c
index 71140f0..b932a63 100644
--- a/payloads/libpayload/drivers/video/video.c
+++ b/payloads/libpayload/drivers/video/video.c
@@ -87,6 +87,9 @@
 		cursory++;
 	}
 
+	if (console->rows <= 0)
+		return;
+
 	while(cursory >= console->rows) {
 		console->scroll_up();
 		cursory--;

-- 
To view, visit https://review.coreboot.org/c/coreboot/+/30092
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib022d3c6fc0c9cf360809dca28761a50c787304a
Gerrit-Change-Number: 30092
Gerrit-PatchSet: 2
Gerrit-Owner: Martin Roth <martinroth at google.com>
Gerrit-Reviewer: Daniel Kurtz <djkurtz at google.com>
Gerrit-Reviewer: Martin Roth <martinroth at google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi at google.com>
Gerrit-Reviewer: Raul Rangel <rrangel at chromium.org>
Gerrit-Reviewer: Simon Glass <sjg at chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>
Gerrit-CC: Julius Werner <jwerner at chromium.org>
Gerrit-CC: Marshall Dawson <marshalldawson3rd at gmail.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181209/a447dd48/attachment.html>


More information about the coreboot-gerrit mailing list