summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Mayo <jmayo@nvidia.com>2011-03-30 20:23:39 -0700
committerRohan Somvanshi <rsomvanshi@nvidia.com>2011-06-29 06:50:17 -0700
commit3a9ccdfff46284d7873592dd1bf4e2aa18a2201c (patch)
tree7a3b3c96ece00ebc7cddbf0d7e00a6ca2ffed969
parent7dd8a41c90a0c26a8aa058a033e82b5428893925 (diff)
ARM: tegra: dc: fix deadlock on overlay wq flush
dc lock is head while flush occurred, but functions called by workers need take the dc lock to proceed. Bug 807015 (cherry picked from commit 2e12d89ac51fe1358f0b01b9ff5cb4978fdcbe9d) Change-Id: Ib358685c478c05a8f95c926e708de12b6a3556fb Reviewed-on: http://git-master/r/38463 Reviewed-by: Linqiang Pu <dpu@nvidia.com> Tested-by: Linqiang Pu <dpu@nvidia.com> Reviewed-by: Jonathan Mayo <jmayo@nvidia.com>
-rw-r--r--drivers/video/tegra/dc/dc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c
index c401562694cb..b9546209ae9b 100644
--- a/drivers/video/tegra/dc/dc.c
+++ b/drivers/video/tegra/dc/dc.c
@@ -1492,9 +1492,6 @@ static void _tegra_dc_controller_disable(struct tegra_dc *dc)
{
disable_irq(dc->irq);
- if (dc->overlay)
- tegra_overlay_disable(dc->overlay);
-
if (dc->out_ops && dc->out_ops->disable)
dc->out_ops->disable(dc);
@@ -1520,6 +1517,9 @@ static void _tegra_dc_disable(struct tegra_dc *dc)
void tegra_dc_disable(struct tegra_dc *dc)
{
+ if (dc->overlay)
+ tegra_overlay_disable(dc->overlay);
+
mutex_lock(&dc->lock);
if (dc->enabled) {
@@ -1803,6 +1803,9 @@ static int tegra_dc_suspend(struct nvhost_device *ndev, pm_message_t state)
dev_info(&ndev->dev, "suspend\n");
+ if (dc->overlay)
+ tegra_overlay_disable(dc->overlay);
+
mutex_lock(&dc->lock);
if (dc->out_ops && dc->out_ops->suspend)