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

Commit fd68f1b4 authored by Narender Ankam's avatar Narender Ankam
Browse files

msm: mdss: dp: avoid aux transactions if dp cable is disconnected



There might be cases where DP cable can be disconnected while
read/write aux transactions are in progress. Avoid retrying
aux transactions if DP cable is disconnected.

Change-Id: Ie6f884c047c6ef3a1584160820e6d41ec0b1e01b
Signed-off-by: default avatarNarender Ankam <nankam@codeaurora.org>
parent 0d2bf7e8
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -395,6 +395,7 @@ static int dp_aux_rw_cmds_retry(struct mdss_dp_drv_pdata *dp,
	int i;
	u32 aux_cfg1_config_count;
	int ret;
	bool connected = false;

	aux_cfg1_config_count = mdss_dp_phy_aux_get_config_cnt(dp,
			PHY_AUX_CFG1);
@@ -404,6 +405,15 @@ retry:
	do {
		struct edp_cmd cmd1 = *cmd;

		mutex_lock(&dp->attention_lock);
		connected = dp->cable_connected;
		mutex_unlock(&dp->attention_lock);

		if (!connected) {
			pr_err("dp cable disconnected\n");
			break;
		}

		dp->aux_error_num = EDP_AUX_ERR_NONE;
		pr_debug("Trying %s, iteration count: %d\n",
			mdss_dp_aux_transaction_to_string(transaction),