mirror of
https://github.com/torvalds/linux.git
synced 2026-10-28 01:26:02 +01:00
HDMI 2.1 sinks ship HF-EEODB EDIDs. Byte 126 deliberately claims one extension block for legacy sources, and the true count lives in the CTA block's first data block. Their high-refresh timings sit in DisplayID extension blocks 2+. The kernel already reads these EDIDs whole, and on GSP boards RM returns the full EDID with its true size. However, nouveau then hands the buffer to the legacy API which sizes the EDID from byte 126 so the DisplayID blocks are not parsed/exposed and the sysfs blob truncates to 256 bytes. The mode list then tops out at the CTA VICs. Convert to the struct drm_edid API, which carries the real size. Read via drm_edid_read_ddc()/drm_edid_read_switcheroo() where an adapter exists, and serve RM's buffer through drm_edid_read_custom() with a block-reading callback where not, which also routes the GSP path through drm's block validation and the debugfs EDID override. A failed RM read now takes the same "no EDID" path as an empty DDC read which stops it from leaking the runtime-PM reference detect() holds. The property, display_info, and mode list go through drm_edid_connector_update()/_add_modes() and every EDID source is funneled through nouveau_connector_set_edid() so all of them reach the property that drm_edid_connector_add_modes() reads from. nouveau_acpi_edid() now returns a drm_edid sized from the EDID's extension count but never past the length _DDC actually returned, so padded buffers pass and truncated ones are rejected, and every firmware-provided EDID (OF, ACPI, VBIOS-embedded) is validated with drm_edid_valid(). An invalid one is treated as no EDID. get_modes() re-syncs the property from the connector's copy when the probe helper has cleared it for a forced-off connector, before adding modes. The few raw EDID readers are converted along with it, so no raw struct edid pointer is kept. Ownership and freeing move to the drm_edid. MST connectors keep their separate legacy path. Signed-off-by: Mohamed Ahmed <mohamedahmedegypt2001@gmail.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Lyude Paul <lyude@redhat.com> Link: https://patch.msgid.link/20260825001408.14219-11-mohamedahmedegypt2001@gmail.com |
||
|---|---|---|
| .. | ||
| drm | ||
| host1x | ||
| ipu-v3 | ||
| nova-core | ||
| tests | ||
| trace | ||
| vga | ||
| buddy.c | ||
| Kconfig | ||
| Makefile | ||