Skip to content

Commit 8cd2079

Browse files
nivedita76ardbiesheuvel
authored andcommitted
efi/gop: Move check for framebuffer before con_out
If the gop doesn't have a framebuffer, there's no point in checking for con_out support. Signed-off-by: Arvind Sankar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ard Biesheuvel <[email protected]>
1 parent bd45870 commit 8cd2079

File tree

1 file changed

+6
-5
lines changed
  • drivers/firmware/efi/libstub

1 file changed

+6
-5
lines changed

drivers/firmware/efi/libstub/gop.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,16 @@ static efi_status_t setup_gop(struct screen_info *si, efi_guid_t *proto,
113113
if (status != EFI_SUCCESS)
114114
continue;
115115

116+
mode = efi_table_attr(gop, mode);
117+
info = efi_table_attr(mode, info);
118+
if (info->pixel_format == PIXEL_BLT_ONLY)
119+
continue;
120+
116121
status = efi_bs_call(handle_protocol, h, &conout_proto, &dummy);
117122
if (status == EFI_SUCCESS)
118123
conout_found = true;
119124

120-
mode = efi_table_attr(gop, mode);
121-
info = efi_table_attr(mode, info);
122-
123-
if ((!first_gop || conout_found) &&
124-
info->pixel_format != PIXEL_BLT_ONLY) {
125+
if (!first_gop || conout_found) {
125126
/*
126127
* Systems that use the UEFI Console Splitter may
127128
* provide multiple GOP devices, not all of which are

0 commit comments

Comments
 (0)