summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@quicinc.com>2017-07-28 16:48:59 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-07-28 16:48:59 -0700
commit826a2e3cd08754c74954b7aec342e9909ef9be0b (patch)
tree0b743b30d4fa9915464817a4f34eb138dd669a4c
parentd0b9794078737cb550ba8f20271c07c5ae5352a9 (diff)
parentfd68f1b43f6d1a63bb304ea4c6829e99a7559330 (diff)
Merge "msm: mdss: dp: avoid aux transactions if dp cable is disconnected"
-rw-r--r--drivers/video/fbdev/msm/mdss_dp_aux.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/video/fbdev/msm/mdss_dp_aux.c b/drivers/video/fbdev/msm/mdss_dp_aux.c
index 23a63121b78c..786fe10055da 100644
--- a/drivers/video/fbdev/msm/mdss_dp_aux.c
+++ b/drivers/video/fbdev/msm/mdss_dp_aux.c
@@ -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),