drm/edid: skip CTA extension scan in drm_edid_to_eld() just for CTA rev
authorJani Nikula <jani.nikula@intel.com>
Tue, 3 May 2022 09:24:04 +0000 (12:24 +0300)
committerJani Nikula <jani.nikula@intel.com>
Thu, 5 May 2022 17:28:46 +0000 (20:28 +0300)
commit58304630b830a1c27457ce2e3a0912555b43d03e
treecc78e658c8a67c6e94a21b3c4a795ec7926486b8
parent8db73897698ccb4eb70ab103245372569ff5a5ec
drm/edid: skip CTA extension scan in drm_edid_to_eld() just for CTA rev

The DisplayID CTA data block version does not necessarily match the CTA
revision. Simplify by postponing drm_edid_to_eld() slightly, and reusing
the CTA revision extracted by drm_parse_cea_ext().

By not bailing out early in drm_edid_to_eld() we may end up filling
meaningless data to the ELD. However, the main decision for audio is not
the ELD, but rather drm_detect_monitor_audio() called by drivers.

(Arguably a future cleanup could do that in drm_add_edid_modes() and
cache the result in the connector.)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/163ebbfd765066acbfc267256fb3b67fc711a78d.1651569697.git.jani.nikula@intel.com
drivers/gpu/drm/drm_edid.c