msm: mdss: synchronize DSI overflow recovery thread with suspend/shutdown

DSI overflow recovery thread has synchronization issues with suspend and
FB shutdown path causing watchdog bark issues due to excessive logging
and NOC errors due to unclocked register access. Add changes to synchronize
the thread properly.

Change-Id: I9e6c4d21803d1bb99349568ac2cca431d5a5d1c3
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
This commit is contained in:
Padmanabhan Komanduru 2015-02-18 21:25:12 +05:30 committed by David Keitel
parent ee6e565bcc
commit d6bc431a14

View file

@ -191,9 +191,12 @@ static void mdss_mdp_video_intf_recovery(void *data, int event)
if (delay > POLL_TIME_USEC_FOR_LN_CNT)
delay = POLL_TIME_USEC_FOR_LN_CNT;
mutex_lock(&ctl->offlock);
while (1) {
if (!ctl || !ctx || !ctx->timegen_en) {
pr_warn("Target is in suspend state\n");
if (!ctl || ctl->mfd->shutdown_pending || !ctx ||
!ctx->timegen_en) {
pr_warn("Target is in suspend or shutdown pending\n");
mutex_unlock(&ctl->offlock);
return;
}
@ -203,6 +206,7 @@ static void mdss_mdp_video_intf_recovery(void *data, int event)
(active_lns_cnt + min_ln_cnt))) {
pr_debug("%s, Needed lines left line_cnt=%d\n",
__func__, line_cnt);
mutex_unlock(&ctl->offlock);
return;
} else {
pr_warn("line count is less. line_cnt = %d\n",