summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/dc/hdmi.c
diff options
context:
space:
mode:
authorManjula Gupta <magupta@nvidia.com>2011-08-01 16:55:13 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:48:33 -0800
commit2dca6ddaa54a7ca474196c9bca8605958f36c4a6 (patch)
tree36dd0677d8eea74a7562e846197d7fdf942eb21f /drivers/video/tegra/dc/hdmi.c
parent3acee8dd88ec37b2b5dc09e2a70470631a9f2ddd (diff)
video: tegra: dc: Update hdmi hot-plug status on resume
- Update the upper layer about hdmi removal in suspended state. - Removes the redundant variable hpd_pending. Bug 857122 Reviewed-on: http://git-master/r/44326 (cherry picked from commit ef32636d02cb3405f7f0232d34fb29a33fc5ad94) Original-Change-Id: Ic1c4cfedfadd318eb0be67d19b528d8e767a7d89 Reviewed-on: http://git-master/r/46642 Tested-by: Manjula Gupta <magupta@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Rebase-Id: Rfc4ee020f2fab2c8bcc0bad74d2d592f71152c00
Diffstat (limited to 'drivers/video/tegra/dc/hdmi.c')
-rw-r--r--drivers/video/tegra/dc/hdmi.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/drivers/video/tegra/dc/hdmi.c b/drivers/video/tegra/dc/hdmi.c
index 71163b274289..f35decc82b53 100644
--- a/drivers/video/tegra/dc/hdmi.c
+++ b/drivers/video/tegra/dc/hdmi.c
@@ -79,7 +79,6 @@ struct tegra_dc_hdmi_data {
spinlock_t suspend_lock;
bool suspended;
- bool hpd_pending;
bool eld_retrieved;
bool clk_enabled;
unsigned audio_freq;
@@ -798,9 +797,7 @@ static irqreturn_t tegra_dc_hdmi_irq(int irq, void *ptr)
unsigned long flags;
spin_lock_irqsave(&hdmi->suspend_lock, flags);
- if (hdmi->suspended) {
- hdmi->hpd_pending = true;
- } else {
+ if (!hdmi->suspended) {
cancel_delayed_work(&hdmi->work);
if (tegra_dc_hdmi_hpd(dc))
queue_delayed_work(system_nrt_wq, &hdmi->work,
@@ -832,18 +829,14 @@ static void tegra_dc_hdmi_resume(struct tegra_dc *dc)
spin_lock_irqsave(&hdmi->suspend_lock, flags);
hdmi->suspended = false;
- if (hdmi->hpd_pending) {
- if (tegra_dc_hdmi_hpd(dc))
- queue_delayed_work(system_nrt_wq, &hdmi->work,
- msecs_to_jiffies(100));
- else
- queue_delayed_work(system_nrt_wq, &hdmi->work,
- msecs_to_jiffies(30));
- hdmi->hpd_pending = false;
- } else if (tegra_dc_hdmi_hpd(dc)) { /* Check for HDMI Peripheral */
+
+ if (tegra_dc_hdmi_hpd(dc))
queue_delayed_work(system_nrt_wq, &hdmi->work,
- msecs_to_jiffies(100));
- }
+ msecs_to_jiffies(100));
+ else
+ queue_delayed_work(system_nrt_wq, &hdmi->work,
+ msecs_to_jiffies(30));
+
spin_unlock_irqrestore(&hdmi->suspend_lock, flags);
tegra_nvhdcp_resume(hdmi->nvhdcp);
}
@@ -939,7 +932,6 @@ static int tegra_dc_hdmi_init(struct tegra_dc *dc)
hdmi->disp1_clk = disp1_clk;
hdmi->disp2_clk = disp2_clk;
hdmi->suspended = false;
- hdmi->hpd_pending = false;
hdmi->eld_retrieved= false;
hdmi->clk_enabled = false;
hdmi->audio_freq = 44100;