[Intel-gfx] [v3][PATCH] drm/i915/display: Drop redundant debug print

Imre Deak imre.deak at intel.com
Thu Aug 12 16:01:18 UTC 2021


On Thu, Aug 12, 2021 at 06:41:07PM +0530, Swati Sharma wrote:
> drm_dp_dpcd_read/write already has debug error message.
> Drop redundant error messages which gives false
> status even if correct value is read in drm_dp_dpcd_read().
> 
> v2: -Added fixes tag (Ankit)
> v3: -Fixed build error (CI)
> 
> Fixes: 9488a030ac91 ("drm/i915: Add support for enabling link status and recovery")
> Cc: Swati Sharma <swati2.sharma at intel.com>
> Cc: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
> Cc: Uma Shankar <uma.shankar at intel.com> (v2)
> Cc: Jani Nikula <jani.nikula at intel.com>
> Cc: "Ville Syrj_l_" <ville.syrjala at linux.intel.com>
> Cc: Imre Deak <imre.deak at intel.com>
> Cc: Manasi Navare <manasi.d.navare at intel.com>
> Cc: Uma Shankar <uma.shankar at intel.com>
> Cc: "Jos_ Roberto de Souza" <jose.souza at intel.com>
> Cc: Sean Paul <seanpaul at chromium.org>
> Cc: <stable at vger.kernel.org> # v5.12+
> 
> Link: https://patchwork.freedesktop.org/patch/msgid/20201218103723.30844-12-ankit.k.nautiyal@intel.com
> 
> Signed-off-by: Swati Sharma <swati2.sharma at intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index c386ef8eb200..2526c9c8c690 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -3864,23 +3864,18 @@ static void intel_dp_check_device_service_irq(struct intel_dp *intel_dp)
>  
>  static void intel_dp_check_link_service_irq(struct intel_dp *intel_dp)
>  {
> -	struct drm_i915_private *i915 = dp_to_i915(intel_dp);
>  	u8 val;
>  
>  	if (intel_dp->dpcd[DP_DPCD_REV] < 0x11)
>  		return;
>  
>  	if (drm_dp_dpcd_readb(&intel_dp->aux,
> -			      DP_LINK_SERVICE_IRQ_VECTOR_ESI0, &val) != 1 || !val) {
> -		drm_dbg_kms(&i915->drm, "Error in reading link service irq vector\n");

The only problem seems to be that for !val the debug print is incorrect,
so maybe just have a separate check for that after this one for the read()
and return w/o the debug message?

Is it really a stable material, since the change wouldn't have any
effect for regular users?

> +			      DP_LINK_SERVICE_IRQ_VECTOR_ESI0, &val) != 1 || !val)
>  		return;
> -	}
>  
>  	if (drm_dp_dpcd_writeb(&intel_dp->aux,
> -			       DP_LINK_SERVICE_IRQ_VECTOR_ESI0, val) != 1) {
> -		drm_dbg_kms(&i915->drm, "Error in writing link service irq vector\n");
> +			       DP_LINK_SERVICE_IRQ_VECTOR_ESI0, val) != 1)
>  		return;
> -	}
>  
>  	if (val & HDMI_LINK_STATUS_CHANGED)
>  		intel_dp_handle_hdmi_link_status_change(intel_dp);
> -- 
> 2.25.1
> 


More information about the Intel-gfx mailing list