diff options
author | Manjula Gupta <magupta@nvidia.com> | 2011-08-01 16:55:13 +0530 |
---|---|---|
committer | Annamaria Pyreddy <apyreddy@nvidia.com> | 2011-09-07 15:19:13 -0700 |
commit | f21385a807eeb331f5f65ffac7d5713d72254c26 (patch) | |
tree | 992074ea172624d257b31f4fe5380e90d378431c | |
parent | b75b93abc2b5ff097dfcff5dc55321af0244dc32 (diff) |
video: tegra: dc: Update hdmi hot-plug status on resumetegra-10.11.15
- Update the upper layer about hdmi removal in suspended state.
- Removes the redundant variable hpd_pending.
Bug 857122
Bug 872278
Change-Id: I0876f50f6d40401b92e4fd36463437a667580f48
Reviewed-on: http://git-master/r/44326
Reviewed-on: http://git-master/r/51008
Reviewed-by: Annamaria Pyreddy <apyreddy@nvidia.com>
Tested-by: Annamaria Pyreddy <apyreddy@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 c58f6e706b85..9850ddc14ec2 100644 --- a/drivers/video/tegra/dc/hdmi.c +++ b/drivers/video/tegra/dc/hdmi.c @@ -64,7 +64,6 @@ struct tegra_dc_hdmi_data { spinlock_t suspend_lock; bool suspended; - bool hpd_pending; bool dvi; }; @@ -624,9 +623,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, @@ -658,18 +655,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); } @@ -780,7 +773,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; spin_lock_init(&hdmi->suspend_lock); hdmi->hpd_switch.name = "hdmi"; |