Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit f150d12

Browse files
drivers/gop: set the default mode to 0
It turns out that some EFI binary expect the mode to selected already when they start. This patches make the GOP driver select the default mode which is 0. Change-Id: I07307768df49911b461b9f2ce6993e508f5775b6 Signed-off-by: Jeremy Compostella <[email protected]>
1 parent 1c70a16 commit f150d12

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

drivers/gop/gop.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ static EFI_STATUS gop_init(EFI_SYSTEM_TABLE *st)
251251
};
252252
pcidev_t pci_dev = 0;
253253
size_t i;
254+
EFI_STATUS ret;
254255

255256
if (!st)
256257
return EFI_INVALID_PARAMETER;
@@ -277,9 +278,14 @@ static EFI_STATUS gop_init(EFI_SYSTEM_TABLE *st)
277278
if (!info.HorizontalResolution || !info.VerticalResolution)
278279
return EFI_SUCCESS;
279280

280-
return interface_init(st, &gop_guid, &gop_handle,
281-
&gop_default, sizeof(gop_default),
282-
(void **)&gop);
281+
ret = interface_init(st, &gop_guid, &gop_handle,
282+
&gop_default, sizeof(gop_default),
283+
(void **)&gop);
284+
if (EFI_ERROR(ret))
285+
return ret;
286+
287+
set_mode((EFI_GRAPHICS_OUTPUT_PROTOCOL *)gop, 0);
288+
return EFI_SUCCESS;
283289
}
284290

285291
static EFI_STATUS gop_exit(EFI_SYSTEM_TABLE *st)

0 commit comments

Comments
 (0)