diff options
Diffstat (limited to 'drivers/video')
-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"; |