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

Jani Nikula jani.nikula at intel.com
Thu Mar 24 09:57:35 UTC 2022


On Thu, 24 Mar 2022, Lee Shawn C <shawn.c.lee at intel.com> wrote:
> From: Cooper Chiou <cooper.chiou at intel.com>
>
> 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: stable at vger.kernel.org
> Cc: Jani Nikula <jani.nikula at intel.com>
> Cc: Shawn C Lee <shawn.c.lee at intel.com>
> Cc: intel-gfx <intel-gfx at lists.freedesktop.org>
> Signed-off-by: Cooper Chiou <cooper.chiou at intel.com>
> Signed-off-by: Lee Shawn C <shawn.c.lee at intel.com>
> Fixes: e28ad544f462 ("drm/edid: parse CEA blocks embedded in DisplayID")
> Reviewed-by: Jani Nikula <jani.nikula at intel.com>

Thanks for the patch, pushed to drm-misc-next-fixes.

BR,
Jani.

> ---
>  drivers/gpu/drm/drm_edid.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 561f53831e29..f07af6786cec 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -4859,7 +4859,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");

-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the dri-devel mailing list