diff mbox

[v2,2/2] drm: tegra: check HDMI sink capability

Message ID 1358347002-10999-2-git-send-email-dev@lynxeye.de (mailing list archive)
State New, archived
Headers show

Commit Message

Lucas Stach Jan. 16, 2013, 2:36 p.m. UTC
Check if sink is HDMI capable when enabling an output. This disables
HDMI audio/infoframes if we are talking to a plain DVI sink. All things
except this check are already in place.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
 drivers/gpu/drm/tegra/hdmi.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Thierry Reding Jan. 16, 2013, 3:24 p.m. UTC | #1
On Wed, Jan 16, 2013 at 03:36:42PM +0100, Lucas Stach wrote:
> Check if sink is HDMI capable when enabling an output. This disables
> HDMI audio/infoframes if we are talking to a plain DVI sink. All things
> except this check are already in place.
> 
> Signed-off-by: Lucas Stach <dev@lynxeye.de>
> ---
>  drivers/gpu/drm/tegra/hdmi.c | 3 +++
>  1 file changed, 3 insertions(+)

Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
Jon Mayo Jan. 16, 2013, 4:05 p.m. UTC | #2
On Wed, Jan 16, 2013 at 7:24 AM, Thierry Reding
<thierry.reding@avionic-design.de> wrote:
> On Wed, Jan 16, 2013 at 03:36:42PM +0100, Lucas Stach wrote:
>> Check if sink is HDMI capable when enabling an output. This disables
>> HDMI audio/infoframes if we are talking to a plain DVI sink. All things
>> except this check are already in place.
>>
>> Signed-off-by: Lucas Stach <dev@lynxeye.de>
>> ---
>>  drivers/gpu/drm/tegra/hdmi.c | 3 +++
>>  1 file changed, 3 insertions(+)
>
> Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>

Reviewed-by: Jon Mayo <jmayo@nvidia.com>
diff mbox

Patch

diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c
index e060c7e..3405313 100644
--- a/drivers/gpu/drm/tegra/hdmi.c
+++ b/drivers/gpu/drm/tegra/hdmi.c
@@ -660,6 +660,9 @@  static int tegra_output_hdmi_enable(struct tegra_output *output)
 	usleep_range(1000, 2000);
 	tegra_periph_reset_deassert(hdmi->clk);
 
+	/* if the connected sink is not HDMI capable fall back to plain DVI */
+	hdmi->dvi = !drm_detect_hdmi_monitor(output->edid);
+
 	tegra_dc_writel(dc, VSYNC_H_POSITION(1),
 			DC_DISP_DISP_TIMING_OPTIONS);
 	tegra_dc_writel(dc, DITHER_CONTROL_DISABLE | BASE_COLOR_SIZE888,