Browse Source

drm/dp: Print the number of bytes processed for aux nacks

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.

v2: Also print the message size (Jani)

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Ville Syrjälä 10 years ago
parent
commit
fb8c5e4988
1 changed files with 2 additions and 2 deletions
  1. 2 2
      drivers/gpu/drm/drm_dp_helper.c

+ 2 - 2
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;
 			break;
 
 
 		case DP_AUX_NATIVE_REPLY_NACK:
 		case DP_AUX_NATIVE_REPLY_NACK:
-			DRM_DEBUG_KMS("native nack\n");
+			DRM_DEBUG_KMS("native nack (result=%d, size=%zu)\n", ret, msg->size);
 			return -EREMOTEIO;
 			return -EREMOTEIO;
 
 
 		case DP_AUX_NATIVE_REPLY_DEFER:
 		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;
 			return ret;
 
 
 		case DP_AUX_I2C_REPLY_NACK:
 		case DP_AUX_I2C_REPLY_NACK:
-			DRM_DEBUG_KMS("I2C nack\n");
+			DRM_DEBUG_KMS("I2C nack (result=%d, size=%zu\n", ret, msg->size);
 			aux->i2c_nack_count++;
 			aux->i2c_nack_count++;
 			return -EREMOTEIO;
 			return -EREMOTEIO;