From 45c163d2da4d3fae3f555bd91d68d6043d2c1f7b Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Thu, 18 Dec 2014 04:28:12 +0100 Subject: apalis/colibri_t20/t30: hdmi: fix dc disable state Our move to modedb lead to the HDMI display controller always being enabled (unless forced off by vidargs). This patch makes sure it gets disabled upon boot disconnected as well as upon later disconnect. Note: This also fixes DVFS on Colibri T30 in the sense that it will again stay at 400 MHz EMC as long as no DVI-D aka HDMI display is connected during boot. --- drivers/video/tegra/dc/hdmi.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/video') diff --git a/drivers/video/tegra/dc/hdmi.c b/drivers/video/tegra/dc/hdmi.c index 225d48ab15ee..e5e6fff7eb46 100644 --- a/drivers/video/tegra/dc/hdmi.c +++ b/drivers/video/tegra/dc/hdmi.c @@ -1430,6 +1430,10 @@ static bool tegra_dc_hdmi_detect(struct tegra_dc *dc) err = tegra_edid_get_monspecs(hdmi->edid, &specs); } if (err < 0) { + /* + * this check is basically senseless now due to us always + * providing at least one fallback mode through modedb + */ if (dc->out->n_modes) tegra_dc_enable(dc); else { @@ -1458,6 +1462,9 @@ static bool tegra_dc_hdmi_detect(struct tegra_dc *dc) return true; fail: + /* disable upon boot disconnected as well as upon later disconnect */ + if (dc->enabled) + tegra_dc_disable(dc); hdmi->eld_retrieved = false; #ifdef CONFIG_SWITCH switch_set_state(&hdmi->hpd_switch, 0); -- cgit v1.2.3