···276276 nr_gops = size / sizeof(void *);277277 for (i = 0; i < nr_gops; i++) {278278 struct efi_graphics_output_mode_info *info;279279- efi_guid_t pciio_proto = EFI_PCI_IO_PROTOCOL_GUID;280280- void *pciio;279279+ efi_guid_t conout_proto = EFI_CONSOLE_OUT_DEVICE_GUID;280280+ bool conout_found = false;281281+ void *dummy;281282 void *h = gop_handle[i];282283283284 status = efi_call_phys3(sys_table->boottime->handle_protocol,···286285 if (status != EFI_SUCCESS)287286 continue;288287289289- efi_call_phys3(sys_table->boottime->handle_protocol,290290- h, &pciio_proto, &pciio);288288+ status = efi_call_phys3(sys_table->boottime->handle_protocol,289289+ h, &conout_proto, &dummy);290290+291291+ if (status == EFI_SUCCESS)292292+ conout_found = true;291293292294 status = efi_call_phys4(gop->query_mode, gop,293295 gop->mode->mode, &size, &info);294294- if (status == EFI_SUCCESS && (!first_gop || pciio)) {296296+ if (status == EFI_SUCCESS && (!first_gop || conout_found)) {295297 /*296296- * Apple provide GOPs that are not backed by297297- * real hardware (they're used to handle298298- * multiple displays). The workaround is to299299- * search for a GOP implementing the PCIIO300300- * protocol, and if one isn't found, to just301301- * fallback to the first GOP.298298+ * Systems that use the UEFI Console Splitter may299299+ * provide multiple GOP devices, not all of which are300300+ * backed by real hardware. The workaround is to search301301+ * for a GOP implementing the ConOut protocol, and if302302+ * one isn't found, to just fall back to the first GOP.302303 */303304 width = info->horizontal_resolution;304305 height = info->vertical_resolution;···311308 pixels_per_scan_line = info->pixels_per_scan_line;312309313310 /*314314- * Once we've found a GOP supporting PCIIO,311311+ * Once we've found a GOP supporting ConOut,315312 * don't bother looking any further.316313 */317317- if (pciio)314314+ if (conout_found)318315 break;319316320317 first_gop = gop;···331328 si->lfb_width = width;332329 si->lfb_height = height;333330 si->lfb_base = fb_base;334334- si->lfb_size = fb_size;335331 si->pages = 1;336332337333 if (pixel_format == PIXEL_RGB_RESERVED_8BIT_PER_COLOR) {···377375 si->rsvd_size = 0;378376 si->rsvd_pos = 0;379377 }378378+379379+ si->lfb_size = si->lfb_linelength * si->lfb_height;380380+381381+ si->capabilities |= VIDEO_CAPABILITY_SKIP_QUIRKS;380382381383free_handle:382384 efi_call_phys1(sys_table->boottime->free_pool, gop_handle);
···553553 int ret;554554 char *option = NULL;555555556556- dmi_check_system(dmi_system_table);556556+ if (screen_info.orig_video_isVGA != VIDEO_TYPE_EFI ||557557+ !(screen_info.capabilities & VIDEO_CAPABILITY_SKIP_QUIRKS))558558+ dmi_check_system(dmi_system_table);557559558560 if (screen_info.orig_video_isVGA != VIDEO_TYPE_EFI)559561 return -ENODEV;
+2
include/linux/screen_info.h
···68686969#define VIDEO_FLAGS_NOCURSOR (1 << 0) /* The video mode has no cursor set */70707171+#define VIDEO_CAPABILITY_SKIP_QUIRKS (1 << 0)7272+7173#ifdef __KERNEL__7274extern struct screen_info screen_info;7375