summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev
diff options
context:
space:
mode:
authorNarender Ankam <nankam@codeaurora.org>2017-08-24 16:44:58 +0530
committerNarender Ankam <nankam@codeaurora.org>2017-08-24 16:44:58 +0530
commitccf418d0ef4d8baf8453c9108b67e024d677c9f8 (patch)
tree87f81a8f7cc8f4e729805dc0f733477f0a4ccd47 /drivers/video/fbdev
parenta5665f1625b3a10c69d6969ee7ec94e8af4d2f41 (diff)
msm: mdss: dp: fix wdog_bite while disconnecting DP cable
As a corner case, if DISCONNECT_IRQ_HPD event is timedout and now if cable is disconnected and userspace triggers BLANK call at the same time, dp core may be turned off before trying to put it in IDLE state. Add changes to avoid this un-clocked register access. Change-Id: I3511443a3be4d3b70f5e68b31234b682e475ebdf Signed-off-by: Narender Ankam <nankam@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r--drivers/video/fbdev/msm/mdss_dp.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/video/fbdev/msm/mdss_dp.c b/drivers/video/fbdev/msm/mdss_dp.c
index a98e5a9007bd..ae1062afb378 100644
--- a/drivers/video/fbdev/msm/mdss_dp.c
+++ b/drivers/video/fbdev/msm/mdss_dp.c
@@ -2116,6 +2116,12 @@ static int mdss_dp_notify_clients(struct mdss_dp_drv_pdata *dp,
goto invalid_request;
if (dp->hpd_notification_status == NOTIFY_DISCONNECT_IRQ_HPD) {
/*
+ * Just in case if NOTIFY_DISCONNECT_IRQ_HPD is timedout
+ */
+ if (dp->power_on)
+ mdss_dp_state_ctrl(&dp->ctrl_io, ST_PUSH_IDLE);
+
+ /*
* user modules already turned off. Need to explicitly
* turn off DP core here.
*/
@@ -2996,6 +3002,12 @@ static void mdss_dp_mainlink_push_idle(struct mdss_panel_data *pdata)
/* wait until link training is completed */
mutex_lock(&dp_drv->train_mutex);
+ if (!dp_drv->power_on) {
+ pr_err("DP Controller not powered on\n");
+ mutex_unlock(&dp_drv->train_mutex);
+ return;
+ }
+
reinit_completion(&dp_drv->idle_comp);
mdss_dp_state_ctrl(&dp_drv->ctrl_io, ST_PUSH_IDLE);
if (!wait_for_completion_timeout(&dp_drv->idle_comp,