Re: [PATCH] drm/edid: Clear EDID Deep Color Modes in drm_reset_display_info()

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

 



On Tue, Jan 25, 2022 at 10:32:51AM +0100, Maxime Ripard wrote:
> Even though we have the other drm_display_info fields reset, the DC
> modes are missing.
> 
> This shouldn't be an issue since it's explicitely reset every time a new
> EDID is parsed.

It's not really obvious that it can't be an issue. I think we might
be saved by info->bpc getting reset to 8 by drm_parse_hdmi_vsdb_video().
But the dc_modes bitfields themselves may be left with stale values.

Hmm, actually drm_add_display_info() re-populates info->bpc *after* 
drm_parse_hdmi_vsdb_video() so we could in theory end up with bpc>8 
and dc_modes!=0 even if the display doesn't support any HDMI deep 
color modes. Though I suppose a display that doesn't do deep color
but declares its max bpc as >8 is a bit nuts. I could maybe imagine
it happening if the display supports >8 bpc with DP but not with 
HDMI, and doesn't bother customizing the EDID sufficiently for
each interface.

> 
> Suggested-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> Signed-off-by: Maxime Ripard <maxime@xxxxxxxxxx>

Reviewed-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

> ---
>  drivers/gpu/drm/drm_edid.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 5251925e3b92..a76224653e6f 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -5340,6 +5340,9 @@ drm_reset_display_info(struct drm_connector *connector)
>  	info->rgb_quant_range_selectable = false;
>  	memset(&info->hdmi, 0, sizeof(info->hdmi));

We should probably just move more stuff into that .hdmi struct...

>  
> +	info->edid_hdmi_rgb444_dc_modes = 0;
> +	info->edid_hdmi_ycbcr444_dc_modes = 0;
> +
>  	info->non_desktop = 0;
>  	memset(&info->monitor_range, 0, sizeof(info->monitor_range));
>  
> -- 
> 2.34.1

-- 
Ville Syrjälä
Intel



[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