Prevents HDMI detect worker from re-disabling DC during
suspend (after tegra_dc_suspend has disabled DC itself)/
Change-Id: I90016fb709934ab8fb5135443980898069f8071f
Signed-off-by: Andrei Warkentin <andreiw@motorola.com>
Signed-off-by: Erik Gilling <konkers@android.com>
if (dc->enabled) {
dc->enabled = false;
- _tegra_dc_disable(dc);
+
+ if (!dc->suspended)
+ _tegra_dc_disable(dc);
}
mutex_unlock(&dc->lock);
if (dc->enabled) {
tegra_fb_suspend(dc->fb);
_tegra_dc_disable(dc);
+
+ dc->suspended = true;
}
mutex_unlock(&dc->lock);
dev_info(&ndev->dev, "resume\n");
mutex_lock(&dc->lock);
+ dc->suspended = false;
+
if (dc->enabled)
_tegra_dc_enable(dc);
struct clk *emc_clk;
bool enabled;
+ bool suspended;
struct tegra_dc_out *out;
struct tegra_dc_out_ops *out_ops;