summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/video/tegra/dc/dc.c14
-rw-r--r--drivers/video/tegra/dc/nvhdcp.c3
2 files changed, 8 insertions, 9 deletions
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c
index a61e86fb5dd7..f39fb40e3ccd 100644
--- a/drivers/video/tegra/dc/dc.c
+++ b/drivers/video/tegra/dc/dc.c
@@ -1044,7 +1044,7 @@ static bool _tegra_dc_enable(struct tegra_dc *dc)
dc->out->enable();
tegra_dc_setup_clk(dc, dc->clk);
-
+ tegra_periph_reset_assert(dc->clk);
clk_enable(dc->clk);
clk_enable(dc->emc_clk);
tegra_periph_reset_deassert(dc->clk);
@@ -1119,14 +1119,12 @@ static void tegra_dc_reset_worker(struct work_struct *work)
dev_warn(&dc->ndev->dev, "overlay stuck in underflow state. resetting.\n");
mutex_lock(&dc->lock);
- _tegra_dc_disable(dc);
-
- msleep(100);
- tegra_periph_reset_assert(dc->clk);
-
- /* _tegra_dc_enable deasserts reset */
- _tegra_dc_enable(dc);
+ if (dc->enabled && !dc->suspended) {
+ _tegra_dc_disable(dc);
+ /* _tegra_dc_enable deasserts reset */
+ _tegra_dc_enable(dc);
+ }
mutex_unlock(&dc->lock);
}
diff --git a/drivers/video/tegra/dc/nvhdcp.c b/drivers/video/tegra/dc/nvhdcp.c
index 5c2d9050a14b..69c13c4110ce 100644
--- a/drivers/video/tegra/dc/nvhdcp.c
+++ b/drivers/video/tegra/dc/nvhdcp.c
@@ -108,8 +108,9 @@ static inline bool nvhdcp_is_plugged(struct tegra_nvhdcp *nvhdcp)
static inline bool nvhdcp_set_plugged(struct tegra_nvhdcp *nvhdcp, bool plugged)
{
- return nvhdcp->plugged = plugged;
+ nvhdcp->plugged = plugged;
wmb();
+ return plugged;
}
static int nvhdcp_i2c_read(struct tegra_nvhdcp *nvhdcp, u8 reg,