diff options
author | Manjula Gupta <magupta@nvidia.com> | 2011-08-01 16:55:13 +0530 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2011-08-08 17:39:13 -0700 |
commit | ef32636d02cb3405f7f0232d34fb29a33fc5ad94 (patch) | |
tree | 8a4f487dd15ec3db7178dc1319bb5428a637e9e7 | |
parent | 54ad1d53ec1f855e133a3c912e0a8c94b4a4c7e1 (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
Change-Id: I78e22e572a9ff0e475d15bbb94c608cfceeefbee
Reviewed-on: http://git-master/r/44326
Tested-by: Manjula Gupta <magupta@nvidia.com>
Reviewed-by: Jonathan Mayo <jmayo@nvidia.com>
-rw-r--r-- | drivers/video/tegra/dc/hdmi.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/drivers/video/tegra/dc/hdmi.c b/drivers/video/tegra/dc/hdmi.c index 6e2a31bfcfb8..0bdf3471e324 100644 --- a/drivers/video/tegra/dc/hdmi.c +++ b/drivers/video/tegra/dc/hdmi.c @@ -76,7 +76,6 @@ struct tegra_dc_hdmi_data { spinlock_t suspend_lock; bool suspended; - bool hpd_pending; bool dvi; bool eld_retrieved; @@ -642,9 +641,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, @@ -676,18 +673,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); } @@ -783,7 +776,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; spin_lock_init(&hdmi->suspend_lock); |