[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4b1172e5-514e-4509-84e0-66818db4adb4@suse.de>
Date: Mon, 17 Nov 2025 08:40:38 +0100
From: Thomas Zimmermann <tzimmermann@...e.de>
To: Javier Martinez Canillas <javierm@...hat.com>, ardb@...nel.org,
jonathan@...ek.ca
Cc: linux-efi@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/5] efi/libstub: gop: Add support for reading EDID
Hi Javier
Am 24.10.25 um 11:56 schrieb Javier Martinez Canillas:
> Thomas Zimmermann <tzimmermann@...e.de> 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 <tzimmermann@...e.de>
>> ---
> [...]
>
>> +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 <javierm@...hat.com>
>
--
--
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)
Powered by blists - more mailing lists