]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
efi/libstub: gop: Add support for reading EDID
authorThomas Zimmermann <tzimmermann@suse.de>
Wed, 15 Oct 2025 15:56:33 +0000 (17:56 +0200)
committerArd Biesheuvel <ardb@kernel.org>
Tue, 18 Nov 2025 19:39:55 +0000 (20:39 +0100)
commit17029cdd8f9d0182a6499e0b7bfc6391e8463091
tree39245dcd8104437397c259bcbbeafc567f416b9e
parentae42b9c5ddda213feb4e5e57673c4b1f9d2f5541
efi/libstub: gop: Add support for reading EDID

Add support for EFI_EDID_DISCOVERED_PROTOCOL and EFI_EDID_ACTIVE_PROTOCOL
as defined in UEFI 2.8, sec 12.9. Define GUIDs and data structures in the
rsp header files.

In the GOP setup function, read the EDID of the primary GOP device. First
try EFI_EDID_ACTIVE_PROTOCOL, which supports user-specified EDID data. Or
else try EFI_EDID_DISCOVERED_PROTOCOL, which returns the display device's
native EDID. If no EDID could be retrieved, clear the storage.

Rename efi_setup_gop() to efi_setup_graphics() to reflect the changes
Let callers pass an optional instance of struct edid_data, if they are
interested.

While screen_info and edid_info come from the same device handle, they
should be considered indendent data. The former refers to the graphics
mode, the latter refers to the display device. GOP devices might not
provide both.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/libstub/efi-stub.c
drivers/firmware/efi/libstub/efistub.h
drivers/firmware/efi/libstub/gop.c
drivers/firmware/efi/libstub/x86-stub.c
include/linux/efi.h