Date: Thu, 19 Apr 2018 03:31:42 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r332751 - in head/stand/efi: boot1 loader Message-ID: <201804190331.w3J3VgaA001507@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevans Date: Thu Apr 19 03:31:41 2018 New Revision: 332751 URL: https://svnweb.freebsd.org/changeset/base/332751 Log: efi loader: Address two nits with recent graphics changes - We should be setting a known graphics mode on conout, but we aren't. - We shouldn't be setting gop mode if we didn't find a good resolution to set, but we were. This made efi_max_resolution=1x1 effectively worthless, since it would always set gop mode 0 if nothing else. Modified: head/stand/efi/boot1/boot1.c head/stand/efi/loader/framebuffer.c Modified: head/stand/efi/boot1/boot1.c ============================================================================== --- head/stand/efi/boot1/boot1.c Thu Apr 19 02:50:15 2018 (r332750) +++ head/stand/efi/boot1/boot1.c Thu Apr 19 03:31:41 2018 (r332751) @@ -415,6 +415,8 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE *Xsystab) */ conout = ST->ConOut; conout->Reset(conout, TRUE); + /* Explicitly set conout to mode 0, 80x25 */ + conout->SetMode(conout, 0); conout->EnableCursor(conout, TRUE); conout->ClearScreen(conout); Modified: head/stand/efi/loader/framebuffer.c ============================================================================== --- head/stand/efi/loader/framebuffer.c Thu Apr 19 02:50:15 2018 (r332750) +++ head/stand/efi/loader/framebuffer.c Thu Apr 19 03:31:41 2018 (r332751) @@ -577,12 +577,14 @@ gop_autoresize(EFI_GRAPHICS_OUTPUT *gop) } } - status = gop->SetMode(gop, best_mode); - if (EFI_ERROR(status)) { - snprintf(command_errbuf, sizeof(command_errbuf), - "gop_autoresize: Unable to set mode to %u (error=%lu)", - mode, EFI_ERROR_CODE(status)); - return (CMD_ERROR); + if (maxdim != 0) { + status = gop->SetMode(gop, best_mode); + if (EFI_ERROR(status)) { + snprintf(command_errbuf, sizeof(command_errbuf), + "gop_autoresize: Unable to set mode to %u (error=%lu)", + mode, EFI_ERROR_CODE(status)); + return (CMD_ERROR); + } } return (CMD_OK); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804190331.w3J3VgaA001507>