@@ -198,6 +198,11 @@ static int drm_dp_dpcd_access(struct drm_dp_aux *aux, u8 request,
err = aux->transfer(aux, &msg);
mutex_unlock(&aux->hw_mutex);
if (err < 0) {
+ /* Immediately retry */
+ if (err == -EAGAIN)
+ continue;
+
+ /* FIXME: On BUSY we could wait before retrying */
if (err == -EBUSY)
continue;
@@ -547,6 +552,11 @@ static int drm_dp_i2c_do_msg(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg)
ret = aux->transfer(aux, msg);
mutex_unlock(&aux->hw_mutex);
if (ret < 0) {
+
+ /*
+ * -EAGAIN retries are handled by i2c layer with
+ * timeouts for repeated -EAGAINs
+ */
if (ret == -EBUSY)
continue;
@@ -758,6 +758,10 @@ struct drm_dp_aux {
* to check for failure.
* - -EBUSY: When BUSY helpers will attempt retries before propagating
* this error.
+ * - -EAGAIN: DPCD helper will attempt immediatelly retries before
+ * propagating this error. i2c helper will only propagate directly
+ * since i2c layer already perform retries with timeouts for repeated
+ * -EAGAINs.
*
* Note that the aux helper code assumes that the .transfer() function
* only modifies the reply field of the drm_dp_aux_msg structure. The