From: Mikko Perttunen <mperttunen@nvidia.com>
To: <thierry.reding@gmail.com>
Cc: <tbergstrom@nvidia.com>, <dri-devel@lists.freedesktop.org>,
<linux-tegra@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Mikko Perttunen <mperttunen@nvidia.com>
Subject: [PATCH v2 3/6] host1x: hdmi: Enable Vdd earlier for hotplug/DDC
Date: Wed, 28 Aug 2013 18:48:39 +0300 [thread overview]
Message-ID: <1377704922-2824-4-git-send-email-mperttunen@nvidia.com> (raw)
In-Reply-To: <1377704922-2824-1-git-send-email-mperttunen@nvidia.com>
The Vdd regulator used to be enabled only at tegra_output_hdmi_enable,
which is called after a sink is detected. However, the HDMI hotplug pin
works by returning the voltage supplied by the Vdd pin, so this meant
that the hotplug pin was never asserted and the sink was not detected
unless the Vdd regulator was set to be always on.
This patch moves the enable to the tegra_hdmi_drm_init function to make
sure the regulator will get enabled.
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
---
drivers/gpu/host1x/drm/hdmi.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/host1x/drm/hdmi.c b/drivers/gpu/host1x/drm/hdmi.c
index 140339b..96a6ae1 100644
--- a/drivers/gpu/host1x/drm/hdmi.c
+++ b/drivers/gpu/host1x/drm/hdmi.c
@@ -716,12 +716,6 @@ static int tegra_output_hdmi_enable(struct tegra_output *output)
h_back_porch = mode->htotal - mode->hsync_end;
h_front_porch = mode->hsync_start - mode->hdisplay;
- err = regulator_enable(hdmi->vdd);
- if (err < 0) {
- dev_err(hdmi->dev, "failed to enable VDD regulator: %d\n", err);
- return err;
- }
-
err = regulator_enable(hdmi->pll);
if (err < 0) {
dev_err(hdmi->dev, "failed to enable PLL regulator: %d\n", err);
@@ -943,7 +937,6 @@ static int tegra_output_hdmi_disable(struct tegra_output *output)
tegra_periph_reset_assert(hdmi->clk);
clk_disable(hdmi->clk);
regulator_disable(hdmi->pll);
- regulator_disable(hdmi->vdd);
return 0;
}
@@ -1240,6 +1233,12 @@ static int tegra_hdmi_drm_init(struct host1x_client *client,
struct tegra_hdmi *hdmi = host1x_client_to_hdmi(client);
int err;
+ err = regulator_enable(hdmi->vdd);
+ if (err < 0) {
+ dev_err(client->dev, "vdd regulator enable failed: %d\n", err);
+ return err;
+ }
+
hdmi->output.type = TEGRA_OUTPUT_HDMI;
hdmi->output.dev = client->dev;
hdmi->output.ops = &hdmi_ops;
@@ -1283,6 +1282,8 @@ static int tegra_hdmi_drm_exit(struct host1x_client *client)
return err;
}
+ regulator_disable(hdmi->vdd);
+
return 0;
}
--
1.8.1.5
next prev parent reply other threads:[~2013-08-28 15:48 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-28 15:48 [PATCH v2 0/6] HDMI support for Tegra114 Dalmore Mikko Perttunen
2013-08-28 15:48 ` [PATCH v2 1/6] host1x: hdmi: Add Tegra114 support Mikko Perttunen
2013-09-04 18:39 ` Stephen Warren
2013-09-04 21:55 ` Thierry Reding
2013-08-28 15:48 ` [PATCH v2 2/6] host1x: hdmi: Detect whether display is connected with HDMI or DVI Mikko Perttunen
2013-09-04 18:40 ` Stephen Warren
2013-09-04 21:59 ` Thierry Reding
2013-08-28 15:48 ` Mikko Perttunen [this message]
2013-09-04 18:44 ` [PATCH v2 3/6] host1x: hdmi: Enable Vdd earlier for hotplug/DDC Stephen Warren
2013-09-04 22:03 ` Mikko Perttunen
2013-09-04 22:24 ` Stephen Warren
2013-08-28 15:48 ` [PATCH v2 4/6] clk: tegra114: Initialize clocks needed for HDMI Mikko Perttunen
2013-09-04 18:45 ` Stephen Warren
2013-08-28 15:48 ` [PATCH v2 5/6] ARM: tegra: Add host1x, DC and HDMI to Tegra114 device tree Mikko Perttunen
2013-09-04 18:46 ` Stephen Warren
2013-08-28 15:48 ` [PATCH v2 6/6] ARM: tegra: Add HDMI to Tegra114 Dalmore " Mikko Perttunen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1377704922-2824-4-git-send-email-mperttunen@nvidia.com \
--to=mperttunen@nvidia.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=tbergstrom@nvidia.com \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®