From: jsg Date: Mon, 11 Apr 2022 03:29:27 +0000 (+0000) Subject: drm/edid: check basic audio support on CEA extension block X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7cc2860d89e96063968a7f05c4c6e014ce981f31;p=openbsd drm/edid: check basic audio support on CEA extension block From Cooper Chiou 6e72980d588e220adbc2469181735399ceb9f9a8 in linux 5.15.y/5.15.33 5662abf6e21338be6d085d6375d3732ac6147fd2 in mainline linux --- diff --git a/sys/dev/pci/drm/drm_edid.c b/sys/dev/pci/drm/drm_edid.c index 7b72f23d770..9e5ad501ffc 100644 --- a/sys/dev/pci/drm/drm_edid.c +++ b/sys/dev/pci/drm/drm_edid.c @@ -4790,7 +4790,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");