summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/dc/dc.c
diff options
context:
space:
mode:
authorNitin Kumbhar <nkumbhar@nvidia.com>2012-02-10 15:10:45 +0530
committerSimone Willett <swillett@nvidia.com>2012-02-15 12:33:25 -0800
commit617cfe24506ef5559a8dd123940bdcd71f07d7b6 (patch)
tree253aac94e6a060eda87eef166b13556238aa28b7 /drivers/video/tegra/dc/dc.c
parent01f9a85e0a17f4137dd8981cc444c11f7385c564 (diff)
video: tegra: dc: protect dc extension disabling with a lock
When dc gets many underflows, instances of reset worker can race to perform reset. dc ext was getting disabled outside critical region affecting display path. disable dc ext after getting the lock. Bug 936545 Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com> Reviewed-on: http://git-master/r/83108 (cherry picked from commit f9dcf7eee8ca8db28cee6fa9550044d1f746e843) Change-Id: Ie29dc66eb52c9be472c2d0db8c0014bfe1837ad4 Reviewed-on: http://git-master/r/83406 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/dc/dc.c')
-rw-r--r--drivers/video/tegra/dc/dc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c
index 7e61458..0756430 100644
--- a/drivers/video/tegra/dc/dc.c
+++ b/drivers/video/tegra/dc/dc.c
@@ -2630,11 +2630,12 @@ static void tegra_dc_reset_worker(struct work_struct *work)
unsigned long val = 0;
+ mutex_lock(&shared_lock);
+
dev_warn(&dc->ndev->dev, "overlay stuck in underflow state. resetting.\n");
tegra_dc_ext_disable(dc->ext);
- mutex_lock(&shared_lock);
mutex_lock(&dc->lock);
if (dc->enabled == false)