All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Maxime Ripard <maxime@cerno.tech>
Cc: David Airlie <airlied@linux.ie>,
	Daniel Vetter <daniel.vetter@intel.com>,
	dri-devel@lists.freedesktop.org,
	Thomas Zimmermann <tzimmermann@suse.de>
Subject: Re: [PATCH] drm/edid: Clear EDID Deep Color Modes in drm_reset_display_info()
Date: Tue, 25 Jan 2022 12:02:36 +0200	[thread overview]
Message-ID: <Ye/KvGlX+vBc01s0@intel.com> (raw)
In-Reply-To: <20220125093251.594772-1-maxime@cerno.tech>

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@linux.intel.com>
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

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

  reply	other threads:[~2022-01-25 10:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-25  9:32 [PATCH] drm/edid: Clear EDID Deep Color Modes in drm_reset_display_info() Maxime Ripard
2022-01-25 10:02 ` Ville Syrjälä [this message]
2022-01-25 10:05 ` Jani Nikula
2022-01-25 14:29 ` (subset) " Maxime Ripard
  -- strict thread matches above, loose matches on Subject: below --
2022-01-25 14:29 Maxime Ripard
2022-01-25 14:31 ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Ye/KvGlX+vBc01s0@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=maxime@cerno.tech \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.