diff options
| author | Jayant Shekhar <jshekhar@codeaurora.org> | 2013-12-17 16:53:31 +0530 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:28:04 -0700 |
| commit | fe64bfa426b3696ffabfd0e2c80aabb7bcc7e605 (patch) | |
| tree | 23840a3169611c75a039878404e2be3fef9cb093 | |
| parent | dc6a831eed4742d80a16536d53531737af5e99c4 (diff) | |
msm: mdss: Prevent race condition between dsi off and bta status check
fb_event_callback() is what is responsible for cancelling the
delayed_work when it gets the FB_BLANK_POWERDOWN event. However,
this event occurs after the panel & DSI have been turned off. So
if the check_status function was being called right when the panel
is being turned off, we have a race conditon. Hence check
shutdown flag to avoid bta status check when dsi is being turned off.
Change-Id: I103bafb4ab63be83c47dfd6b3bad06d36704ff68
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_dsi_status.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/video/fbdev/msm/mdss_dsi_status.c b/drivers/video/fbdev/msm/mdss_dsi_status.c index f0c4f4c2b72f..fd7f3fd56065 100644 --- a/drivers/video/fbdev/msm/mdss_dsi_status.c +++ b/drivers/video/fbdev/msm/mdss_dsi_status.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, The Linux Foundation. All rights reserved. +/* Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -86,6 +86,15 @@ static void check_dsi_ctrl_status(struct work_struct *work) mutex_lock(ctl->shared_lock); mutex_lock(&mdp5_data->ov_lock); + if (pdsi_status->mfd->shutdown_pending) { + mutex_unlock(&mdp5_data->ov_lock); + if (ctl->shared_lock) + mutex_unlock(ctl->shared_lock); + pr_err("%s: DSI turning off, avoiding BTA status check\n", + __func__); + return; + } + /* * For the command mode panels, we return pan display * IOCTL on vsync interrupt. So, after vsync interrupt comes |
