[3/4] drm/i915: debug log for REPLY_ACK missing

Submitted by Ramalingam C on Nov. 27, 2018, 2:02 p.m.

Details

Message ID 1543327379-22629-4-git-send-email-ramalingam.c@intel.com
State New
Headers show
Series "HDCP1.4 fixes" ( rev: 9 8 ) in Intel GFX

Not browsing as part of any series.

Commit Message

Ramalingam C Nov. 27, 2018, 2:02 p.m.
Adding a debug log when the DP_AUX_NATIVE_REPLY_ACK is missing
for aksv write. This helps to locate the possible non responding
DP HDCP sinks.

Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 70ae3d57316b..18e3a5a3d873 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -5390,7 +5390,11 @@  int intel_dp_hdcp_write_an_aksv(struct intel_digital_port *intel_dig_port,
 	}
 
 	reply = (rxbuf[0] >> 4) & DP_AUX_NATIVE_REPLY_MASK;
-	return reply == DP_AUX_NATIVE_REPLY_ACK ? 0 : -EIO;
+	ret = reply == DP_AUX_NATIVE_REPLY_ACK ? 0 : -EIO;
+	if (ret)
+		DRM_DEBUG_KMS("Aksv write: DP_AUX_NATIVE_REPLY_ACK missing\n");
+
+	return ret;
 }
 
 static int intel_dp_hdcp_read_bksv(struct intel_digital_port *intel_dig_port,

Comments

On Tue, Nov 27, 2018 at 07:32:58PM +0530, Ramalingam C wrote:
> Adding a debug log when the DP_AUX_NATIVE_REPLY_ACK is missing
> for aksv write. This helps to locate the possible non responding
> DP HDCP sinks.
> 
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_dp.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 70ae3d57316b..18e3a5a3d873 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -5390,7 +5390,11 @@ int intel_dp_hdcp_write_an_aksv(struct intel_digital_port *intel_dig_port,
>  	}
>  
>  	reply = (rxbuf[0] >> 4) & DP_AUX_NATIVE_REPLY_MASK;
> -	return reply == DP_AUX_NATIVE_REPLY_ACK ? 0 : -EIO;
> +	ret = reply == DP_AUX_NATIVE_REPLY_ACK ? 0 : -EIO;
> +	if (ret)
> +		DRM_DEBUG_KMS("Aksv write: DP_AUX_NATIVE_REPLY_ACK missing\n");

This is pretty hard to read. Could you please change to:

        if (reply != DP_AUX_NATIVE_REPLY_ACK) {
                DRM_DEBUG_KMS("Aksv write: no DP_AUX_NATIVE_REPLY_ACK %x\n",
                              reply);
                return -EIO
        }
        return 0;

With this change,

Reviewed-by: Sean Paul <sean@poorly.run>


> +
> +	return ret;
>  }
>  
>  static int intel_dp_hdcp_read_bksv(struct intel_digital_port *intel_dig_port,
> -- 
> 2.7.4
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel