summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaurav Sarode <gsarode@nvidia.com>2010-12-17 18:49:22 -0800
committerBharat Nihalani <bnihalani@nvidia.com>2010-12-21 00:09:26 -0800
commit1d46b71b62739a2f4154918c0055f85c29d8e6d5 (patch)
tree6472f5dfb778c434d793878929a1d714459455f6
parentc26bcfa6c99742f825db2ea79ec328ce1b905c54 (diff)
HDMI WAR: Fixed HDMI issue after LP0 resume.
HDMI panel does not work when resuming from LP0. This change acuires wake lock during HDMI is enabled, hence prevents device going to LP0. This need to be reverted once original fix is in. Change-Id: Ie980923796d7b30c36099299ea04064a49c0d601 Reviewed-on: http://git-master/r/13719 Tested-by: Gaurav Sarode <gsarode@nvidia.com> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
-rw-r--r--drivers/video/tegra/dc/hdmi.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/video/tegra/dc/hdmi.c b/drivers/video/tegra/dc/hdmi.c
index 006529d78101..3100bd090b78 100644
--- a/drivers/video/tegra/dc/hdmi.c
+++ b/drivers/video/tegra/dc/hdmi.c
@@ -24,6 +24,7 @@
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
+#include <linux/wakelock.h>
#include <linux/switch.h>
#include <linux/workqueue.h>
@@ -57,6 +58,8 @@ struct tegra_dc_hdmi_data {
struct switch_dev hpd_switch;
+ struct wake_lock wake_lock;
+
spinlock_t suspend_lock;
bool suspended;
bool hpd_pending;
@@ -619,6 +622,7 @@ static int tegra_dc_hdmi_init(struct tegra_dc *dc)
tegra_dc_set_outdata(dc, hdmi);
+ wake_lock_init(&hdmi->wake_lock, WAKE_LOCK_SUSPEND, "HDMI");
return 0;
err_free_irq:
@@ -653,6 +657,7 @@ static void tegra_dc_hdmi_destroy(struct tegra_dc *dc)
clk_put(hdmi->disp2_clk);
tegra_edid_destroy(hdmi->edid);
+ wake_lock_destroy(&hdmi->wake_lock);
kfree(hdmi);
}
@@ -1093,6 +1098,8 @@ static void tegra_dc_hdmi_enable(struct tegra_dc *dc)
tegra_dc_writel(dc, DISP_CTRL_MODE_C_DISPLAY, DC_CMD_DISPLAY_COMMAND);
tegra_dc_writel(dc, GENERAL_ACT_REQ << 8, DC_CMD_STATE_CONTROL);
tegra_dc_writel(dc, GENERAL_ACT_REQ, DC_CMD_STATE_CONTROL);
+
+ wake_lock(&hdmi->wake_lock);
}
static void tegra_dc_hdmi_disable(struct tegra_dc *dc)
@@ -1101,6 +1108,7 @@ static void tegra_dc_hdmi_disable(struct tegra_dc *dc)
tegra_periph_reset_assert(hdmi->clk);
clk_disable(hdmi->clk);
+ wake_unlock(&hdmi->wake_lock);
}
struct tegra_dc_out_ops tegra_dc_hdmi_ops = {
.init = tegra_dc_hdmi_init,