drm: tegra: check HDMI sink capability
PATCH 1/1 drm: tegra: check HDMI sink capability
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.
--- drivers/gpu/drm/tegra/hdmi.c | 3 +++
1 Datei geändert, 3 Zeilen hinzugefügt(+)
drivers/gpu/drm/tegra/hdmi.c +3 -0
@@ -673,6 +673,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 ((struct edid *)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,
Signature · 1 line
1.7.11.7
Quoted 14 lines · Lucas Stach
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 <[email protected]>--- drivers/gpu/drm/tegra/hdmi.c | 3 +++1 Datei geändert, 3 Zeilen hinzugefügt(+)
drivers/gpu/drm/tegra/hdmi.c +0
-0
drivers/gpu/drm/tegra/hdmi.c static int tegra_output_hdmi_enable(struct tegra_output *output) · line 677
Quoted 5 lines
drivers/gpu/drm/tegra/hdmi.c +2
-0@@ -673,6 +673,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 ((struct edid *)output->edid);
Shouldn't we update drm_detect_hdmi_monitor() to take a const struct edid * instead so that this cast isn't required?
Thierry
Thanks. Honestly don't know drm has this function...
Mark
Quoted 24 lines · Lucas Stach
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 <[email protected]>--- drivers/gpu/drm/tegra/hdmi.c | 3 +++1 Datei geändert, 3 Zeilen hinzugefügt(+)
drivers/gpu/drm/tegra/hdmi.c +3
-0@@ -673,6 +673,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 ((struct edid *)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,
Am Dienstag, den 18.12.2012, 07:50 +0100 schrieb Thierry Reding:
Quoted 18 lines · Lucas Stach
Quoted 17 lines
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 <[email protected]>--- drivers/gpu/drm/tegra/hdmi.c | 3 +++1 Datei geändert, 3 Zeilen hinzugefügt(+)
drivers/gpu/drm/tegra/hdmi.c +0
-0@@ -673,6 +673,9 @@ static int tegra_output_hdmi_enable(struct tegra_output *output)usleep_range (1000 ,2000 );tegra_periph_reset_deassert (hdmi->clk);
Quoted 6 lines
drivers/gpu/drm/tegra/hdmi.c static int tegra_output_hdmi_enable(struct tegra_output *output) · line 677
Quoted 2 lines
drivers/gpu/drm/tegra/hdmi.c +2
-0+/* if the connected sink is not HDMI capable fall back to plain DVI */ + hdmi->dvi = !drm_detect_hdmi_monitor ((struct edid *)output->edid);Shouldn't we update
drm_detect_hdmi_monitor()to take a const struct edid * instead so that this cast isn't required?
Yeah. There are a lot of functions to update to make this work right, though. But as the next merge window is a fair bit away I'll respin this with proper constified drm edid functions.
Regards,
Lucas