Module Name:    src
Committed By:   martin
Date:           Mon Mar  9 09:48:00 UTC 2020

Modified Files:
        src/sys/arch/i386/stand/efiboot [netbsd-8]: eficons.c

Log Message:
Pull up following revision(s) (requested by nonaka in ticket #1519):

        sys/arch/i386/stand/efiboot/eficons.c: revision 1.10
        sys/arch/i386/stand/efiboot/eficons.c: revision 1.11

If the default GOP mode is unavailable, fallback to the first mode defined.
PR# port-amd64/55000

Remove check for bestmode==-1 (shouldn't happen)


To generate a diff of this commit:
cvs rdiff -u -r1.4.2.5 -r1.4.2.6 src/sys/arch/i386/stand/efiboot/eficons.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/i386/stand/efiboot/eficons.c
diff -u src/sys/arch/i386/stand/efiboot/eficons.c:1.4.2.5 src/sys/arch/i386/stand/efiboot/eficons.c:1.4.2.6
--- src/sys/arch/i386/stand/efiboot/eficons.c:1.4.2.5	Tue Feb 11 11:38:33 2020
+++ src/sys/arch/i386/stand/efiboot/eficons.c	Mon Mar  9 09:48:00 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: eficons.c,v 1.4.2.5 2020/02/11 11:38:33 martin Exp $	*/
+/*	$NetBSD: eficons.c,v 1.4.2.6 2020/03/09 09:48:00 martin Exp $	*/
 
 /*-
  * Copyright (c) 2016 Kimihiro Nonaka <[email protected]>
@@ -37,6 +37,7 @@
 #ifndef DEFAULT_GOP_MODE
 #define DEFAULT_GOP_MODE	"1024x768"
 #endif
+#define FALLBACK_GOP_MODE	0
 
 extern struct x86_boot_params boot_params;
 
@@ -420,7 +421,7 @@ bi_framebuffer(void)
 	EFI_STATUS status;
 	EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *info;
 	struct btinfo_framebuffer fb;
-	INT32 bestmode = -1;
+	INT32 bestmode;
 	UINTN sz;
 
 	if (efi_gop == NULL)
@@ -431,9 +432,9 @@ bi_framebuffer(void)
 	} else {
 		/* If a mode has not been selected, choose a default */
 		bestmode = efi_find_gop_mode(DEFAULT_GOP_MODE);
+		if (bestmode == -1)
+			bestmode = FALLBACK_GOP_MODE;
 	}
-	if (bestmode == -1)
-		goto nofb;
 
 	status = uefi_call_wrapper(efi_gop->SetMode, 2, efi_gop,
 	    bestmode);

Reply via email to