aboutsummaryrefslogtreecommitdiff
path: root/stand/efi
diff options
context:
space:
mode:
authorMichael Zhilin <mizhka@FreeBSD.org>2017-12-21 12:21:35 +0000
committerMichael Zhilin <mizhka@FreeBSD.org>2017-12-21 12:21:35 +0000
commit5e6e2d38c13308a1848ea1afe40f3b19912139a2 (patch)
tree4ab8538f3aa8c828dea31eae3baa10dbf844233c /stand/efi
parent4be29fb3c55b8b352e7d02ff93df793b2133dffe (diff)
downloadsrc-5e6e2d38c13308a1848ea1afe40f3b19912139a2.tar.gz
src-5e6e2d38c13308a1848ea1afe40f3b19912139a2.zip
[boot/efi] scan all display modes rather than sequential try-fail way
This patch allows to scan all display modes in boot1 as loader does. Before system tried to select optimal display mode by sequential scan of modes and if error then stop scanning. This way is not good, because if mode N is not present, mode N+1 may exist. In loader we use conout->Mode->MaxMode to identify maximum number of modes. This commit is to use same way in boot1 as in loader. Reported by: Andrey Pustovetov <andrey.pustovetov@gmail.com> Reviewed by: tsoome Differential Revision: https://reviews.freebsd.org/D13541
Notes
Notes: svn path=/head/; revision=327058
Diffstat (limited to 'stand/efi')
-rw-r--r--stand/efi/boot1/boot1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stand/efi/boot1/boot1.c b/stand/efi/boot1/boot1.c
index 7b51f03e14af..f00c058e37d5 100644
--- a/stand/efi/boot1/boot1.c
+++ b/stand/efi/boot1/boot1.c
@@ -430,10 +430,10 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE *Xsystab)
conout = ST->ConOut;
conout->Reset(conout, TRUE);
max_dim = best_mode = 0;
- for (i = 0; ; i++) {
+ for (i = 0; i < conout->Mode->MaxMode; i++) {
status = conout->QueryMode(conout, i, &cols, &rows);
if (EFI_ERROR(status))
- break;
+ continue;
if (cols * rows > max_dim) {
max_dim = cols * rows;
best_mode = i;