From 2dca6ddaa54a7ca474196c9bca8605958f36c4a6 Mon Sep 17 00:00:00 2001 From: Manjula Gupta Date: Mon, 1 Aug 2011 16:55:13 +0530 Subject: 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 Reviewed-by: Bharat Nihalani Rebase-Id: Rfc4ee020f2fab2c8bcc0bad74d2d592f71152c00 --- drivers/video/tegra/dc/hdmi.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'drivers/video/tegra/dc/hdmi.c') 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; -- cgit v1.2.3