Hi Javier

Am 24.10.25 um 11:56 schrieb Javier Martinez Canillas:
Thomas Zimmermann <[email protected]> writes:

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
independent

mode, the latter refers to the display device. GOP devices might not
provide both.

Signed-off-by: Thomas Zimmermann <[email protected]>
---
[...]

+static void setup_edid_info(struct edid_info *edid, u32 gop_size_of_edid, u8 
*gop_edid)
+{
+       if (!gop_edid || gop_size_of_edid < 128)
Can you define a constant for 128 instead of having a magic number ?

Of course. FYI the number comes from the UEFI spec 2.8, sec 12.9. It says that the minimum EDID size is 128 bytes.

Best regards
Thomas


Reviewed-by: Javier Martinez Canillas <[email protected]>


--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)


Reply via email to