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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 23 Mar 2022, Lee Shawn C <shawn.c.lee@xxxxxxxxx> wrote:
> From: Cooper Chiou <cooper.chiou@xxxxxxxxx>
>
> 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.
>
> Cc: Jani Nikula <jani.nikula@xxxxxxxxx>
> Cc: Shawn C Lee <shawn.c.lee@xxxxxxxxx>
> Cc: intel-gfx <intel-gfx@xxxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Cooper Chiou <cooper.chiou@xxxxxxxxx>
> Signed-off-by: Lee Shawn C <shawn.c.lee@xxxxxxxxx>

Fixes: e28ad544f462 ("drm/edid: parse CEA blocks embedded in DisplayID")
Cc: <stable@xxxxxxxxxxxxxxx> # v4.15
Reviewed-by: Jani Nikula <jani.nikula@xxxxxxxxx>

(commit e28ad544f462 was merged in v5.3, but it has Cc: stable for
v4.15.)

Also drm_edid_to_eld() and drm_parse_cea_ext() are affected by the same
issue. For the former, it doesn't really matter all that much, it just
ends up using the DisplayID data block version instead, but the latter
adds bogus color formats and should be fixed. Patch follows.

All of these are fixed in my recent series [1], but we'll want the
simple fixes for stable first.

BR,
Jani.

[1] https://patchwork.freedesktop.org/series/101659/

> ---
>  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



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux