drm/edid: check basic audio support on CEA extension block

commit 5662abf6e21338be6d085d6375d3732ac6147fd2 upstream.

Tag code stored in bit7:5 for CTA block byte[3] is not the same as
CEA extension block definition. Only check CEA block has
basic audio support.

v3: update commit message.

Cc: [email protected]
Cc: Jani Nikula <[email protected]>
Cc: Shawn C Lee <[email protected]>
Cc: intel-gfx <[email protected]>
Signed-off-by: Cooper Chiou <[email protected]>
Signed-off-by: Lee Shawn C <[email protected]>
Fixes: e28ad544f4 ("drm/edid: parse CEA blocks embedded in DisplayID")
Reviewed-by: Jani Nikula <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
Cooper Chiou 2022-03-24 14:12:18 +08:00 • committed by Greg Kroah-Hartman
commit 67643b89fb

View file

@ -4380,7 +4380,8 @@ bool drm_detect_monitor_audio(struct edid *edid)
if (!edid_ext)
goto end;
has_audio = ((edid_ext[3] & EDID_BASIC_AUDIO) != 0);
has_audio = (edid_ext[0] == CEA_EXT &&
(edid_ext[3] & EDID_BASIC_AUDIO) != 0);
if (has_audio) {
DRM_DEBUG_KMS("Monitor has basic audio support\n");