diff mbox

[1/3] drm/dp: Print the number of bytes processed for aux nacks

Message ID 1426758247-20308-1-git-send-email-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ville Syrjala March 19, 2015, 9:44 a.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

When doing a native or i2c aux write the sink will indicate the number
of bytes written even if it the nacks the transfer. When we receive a
nack we just return an error upwards, but it might still be interesting
to see how many bytes made it before the nack. So include that information
in the debug messages.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_dp_helper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jani Nikula March 19, 2015, 10:21 a.m. UTC | #1
On Thu, 19 Mar 2015, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> When doing a native or i2c aux write the sink will indicate the number
> of bytes written even if it the nacks the transfer. When we receive a
> nack we just return an error upwards, but it might still be interesting
> to see how many bytes made it before the nack. So include that information
> in the debug messages.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/drm_dp_helper.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
> index d5368ea..d7c73bd 100644
> --- a/drivers/gpu/drm/drm_dp_helper.c
> +++ b/drivers/gpu/drm/drm_dp_helper.c
> @@ -462,7 +462,7 @@ static int drm_dp_i2c_do_msg(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)
>  			break;
>  
>  		case DP_AUX_NATIVE_REPLY_NACK:
> -			DRM_DEBUG_KMS("native nack\n");
> +			DRM_DEBUG_KMS("native nack (%d)\n", ret);

I guess it would be useful to print the full length too, so you know if
it was a short write or not.

BR,
Jani.


>  			return -EREMOTEIO;
>  
>  		case DP_AUX_NATIVE_REPLY_DEFER:
> @@ -493,7 +493,7 @@ static int drm_dp_i2c_do_msg(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)
>  			return ret;
>  
>  		case DP_AUX_I2C_REPLY_NACK:
> -			DRM_DEBUG_KMS("I2C nack\n");
> +			DRM_DEBUG_KMS("I2C nack (%d)\n", ret);
>  			aux->i2c_nack_count++;
>  			return -EREMOTEIO;
>  
> -- 
> 2.0.5
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
index d5368ea..d7c73bd 100644
--- a/drivers/gpu/drm/drm_dp_helper.c
+++ b/drivers/gpu/drm/drm_dp_helper.c
@@ -462,7 +462,7 @@  static int drm_dp_i2c_do_msg(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)
 			break;
 
 		case DP_AUX_NATIVE_REPLY_NACK:
-			DRM_DEBUG_KMS("native nack\n");
+			DRM_DEBUG_KMS("native nack (%d)\n", ret);
 			return -EREMOTEIO;
 
 		case DP_AUX_NATIVE_REPLY_DEFER:
@@ -493,7 +493,7 @@  static int drm_dp_i2c_do_msg(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)
 			return ret;
 
 		case DP_AUX_I2C_REPLY_NACK:
-			DRM_DEBUG_KMS("I2C nack\n");
+			DRM_DEBUG_KMS("I2C nack (%d)\n", ret);
 			aux->i2c_nack_count++;
 			return -EREMOTEIO;