Re: [PATCH 02/12] drm/i915: Include CRTC info in infoframe mismatch prints

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

 



On Thu, Feb 22, 2024 at 04:47:39PM -0500, Rodrigo Vivi wrote:
> On Thu, Feb 15, 2024 at 06:40:45PM +0200, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > 
> > Most crtc state mismatches include the CRTC id+name in the
> > prints. Also include it in the infoframe mismatches.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > ---
> >  drivers/gpu/drm/i915/display/intel_display.c | 14 +++++++++-----
> >  1 file changed, 9 insertions(+), 5 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> > index a7f487f5c2b2..e3520a3da468 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > @@ -4788,23 +4788,27 @@ intel_compare_buffer(const u8 *a, const u8 *b, size_t len)
> >  }
> >  
> >  static void
> > -pipe_config_infoframe_mismatch(struct drm_i915_private *dev_priv,
> > -			       bool fastset, const char *name,
> > +pipe_config_infoframe_mismatch(bool fastset, const struct intel_crtc *crtc,
> 
> why not crtc, fastset? having the main struct as the first
> argument seems more natural imho

Consistency. This order was already used by some other
mismatch() functions. So if we want to reorder we should
change all of them.

> 
> anyway,
> 
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>
> 
> > +			       const char *name,
> >  			       const union hdmi_infoframe *a,
> >  			       const union hdmi_infoframe *b)
> >  {
> > +	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
> > +
> >  	if (fastset) {
> >  		if (!drm_debug_enabled(DRM_UT_KMS))
> >  			return;
> >  
> >  		drm_dbg_kms(&dev_priv->drm,
> > -			    "fastset requirement not met in %s infoframe\n", name);
> > +			    "[CRTC:%d:%s] fastset requirement not met in %s infoframe\n",
> > +			    crtc->base.base.id, crtc->base.name, name);
> >  		drm_dbg_kms(&dev_priv->drm, "expected:\n");
> >  		hdmi_infoframe_log(KERN_DEBUG, dev_priv->drm.dev, a);
> >  		drm_dbg_kms(&dev_priv->drm, "found:\n");
> >  		hdmi_infoframe_log(KERN_DEBUG, dev_priv->drm.dev, b);
> >  	} else {
> > -		drm_err(&dev_priv->drm, "mismatch in %s infoframe\n", name);
> > +		drm_err(&dev_priv->drm, "[CRTC:%d:%s] mismatch in %s infoframe\n",
> > +			crtc->base.base.id, crtc->base.name, name);
> >  		drm_err(&dev_priv->drm, "expected:\n");
> >  		hdmi_infoframe_log(KERN_ERR, dev_priv->drm.dev, a);
> >  		drm_err(&dev_priv->drm, "found:\n");
> > @@ -5072,7 +5076,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
> >  #define PIPE_CONF_CHECK_INFOFRAME(name) do { \
> >  	if (!intel_compare_infoframe(&current_config->infoframes.name, \
> >  				     &pipe_config->infoframes.name)) { \
> > -		pipe_config_infoframe_mismatch(dev_priv, fastset, __stringify(name), \
> > +		pipe_config_infoframe_mismatch(fastset, crtc, __stringify(name), \
> >  					       &current_config->infoframes.name, \
> >  					       &pipe_config->infoframes.name); \
> >  		ret = false; \
> > -- 
> > 2.43.0
> > 

-- 
Ville Syrjälä
Intel



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux