Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 942fcac0 authored by Ajay Singh Parmar's avatar Ajay Singh Parmar
Browse files

drm/msm/dp: break aux transfer retry loop if timed-out



In case of AUX transaction timeout in debug mode, abort
the transaction so that DP can break out of the re-try logic.
The timeout can happen if the simulation scripts is abruptly
stopped. In that case, bring the DP driver to a stable state
instead of re-trying AUX and timing out.

Change-Id: Iad8e0455692ef8adaa011629a9b67a2ef4e37de4
Signed-off-by: default avatarAjay Singh Parmar <aparmar@codeaurora.org>
parent 8b3dffa7
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -515,6 +515,7 @@ static ssize_t dp_aux_transfer_debug(struct drm_dp_aux *drm_aux,
			timeout = wait_for_completion_timeout(&aux->comp, HZ);
			if (!timeout) {
				pr_err("aux timeout for 0x%x\n", msg->address);
				atomic_set(&aux->aborted, 1);
				ret = -ETIMEDOUT;
				goto end;
			}
@@ -751,10 +752,12 @@ static void dp_aux_set_sim_mode(struct dp_aux *dp_aux, bool en,
	aux->edid = edid;
	aux->dpcd = dpcd;

	if (en)
	if (en) {
		atomic_set(&aux->aborted, 0);
		aux->drm_aux.transfer = dp_aux_transfer_debug;
	else
	} else {
		aux->drm_aux.transfer = dp_aux_transfer;
	}

	mutex_unlock(&aux->mutex);
}