* [PATCH] drm: tegra: check HDMI sink capability
@ 2012-12-17 17:59 Lucas Stach
[not found] ` <1355767163-5423-1-git-send-email-dev-8ppwABl0HbeELgA04lAiVw@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Lucas Stach @ 2012-12-17 17:59 UTC (permalink / raw)
To: linux-tegra-u79uwXL29TY76Z2rM5mHXA
Cc: Thierry Reding, Stephen Warren, Mark Zhang
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-8ppwABl0HbeELgA04lAiVw@public.gmane.org>
---
drivers/gpu/drm/tegra/hdmi.c | 3 +++
1 Datei geändert, 3 Zeilen hinzugefügt(+)
diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c
index ab40164..32ea7d4 100644
--- a/drivers/gpu/drm/tegra/hdmi.c
+++ b/drivers/gpu/drm/tegra/hdmi.c
@@ -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,
--
1.7.11.7
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm: tegra: check HDMI sink capability
[not found] ` <1355767163-5423-1-git-send-email-dev-8ppwABl0HbeELgA04lAiVw@public.gmane.org>
@ 2012-12-18 6:50 ` Thierry Reding
[not found] ` <20121218065056.GA4909-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-12-18 8:21 ` Mark Zhang
1 sibling, 1 reply; 4+ messages in thread
From: Thierry Reding @ 2012-12-18 6:50 UTC (permalink / raw)
To: Lucas Stach
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren, Mark Zhang
[-- Attachment #1: Type: text/plain, Size: 1067 bytes --]
On Mon, Dec 17, 2012 at 06:59:23PM +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-8ppwABl0HbeELgA04lAiVw@public.gmane.org>
> ---
> drivers/gpu/drm/tegra/hdmi.c | 3 +++
> 1 Datei geändert, 3 Zeilen hinzugefügt(+)
>
> diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c
> index ab40164..32ea7d4 100644
> --- a/drivers/gpu/drm/tegra/hdmi.c
> +++ b/drivers/gpu/drm/tegra/hdmi.c
> @@ -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
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm: tegra: check HDMI sink capability
[not found] ` <1355767163-5423-1-git-send-email-dev-8ppwABl0HbeELgA04lAiVw@public.gmane.org>
2012-12-18 6:50 ` Thierry Reding
@ 2012-12-18 8:21 ` Mark Zhang
1 sibling, 0 replies; 4+ messages in thread
From: Mark Zhang @ 2012-12-18 8:21 UTC (permalink / raw)
To: Lucas Stach
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Thierry Reding,
Stephen Warren
Thanks. Honestly don't know drm has this function...
Mark
On 12/18/2012 01:59 AM, 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-8ppwABl0HbeELgA04lAiVw@public.gmane.org>
> ---
> drivers/gpu/drm/tegra/hdmi.c | 3 +++
> 1 Datei geändert, 3 Zeilen hinzugefügt(+)
>
> diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c
> index ab40164..32ea7d4 100644
> --- a/drivers/gpu/drm/tegra/hdmi.c
> +++ b/drivers/gpu/drm/tegra/hdmi.c
> @@ -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,
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm: tegra: check HDMI sink capability
[not found] ` <20121218065056.GA4909-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
@ 2012-12-18 9:23 ` Lucas Stach
0 siblings, 0 replies; 4+ messages in thread
From: Lucas Stach @ 2012-12-18 9:23 UTC (permalink / raw)
To: Thierry Reding
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren, Mark Zhang
Am Dienstag, den 18.12.2012, 07:50 +0100 schrieb Thierry Reding:
> On Mon, Dec 17, 2012 at 06:59:23PM +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-8ppwABl0HbeELgA04lAiVw@public.gmane.org>
> > ---
> > drivers/gpu/drm/tegra/hdmi.c | 3 +++
> > 1 Datei geändert, 3 Zeilen hinzugefügt(+)
> >
> > diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c
> > index ab40164..32ea7d4 100644
> > --- a/drivers/gpu/drm/tegra/hdmi.c
> > +++ b/drivers/gpu/drm/tegra/hdmi.c
> > @@ -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?
>
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-12-18 9:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-17 17:59 [PATCH] drm: tegra: check HDMI sink capability Lucas Stach
[not found] ` <1355767163-5423-1-git-send-email-dev-8ppwABl0HbeELgA04lAiVw@public.gmane.org>
2012-12-18 6:50 ` Thierry Reding
[not found] ` <20121218065056.GA4909-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-12-18 9:23 ` Lucas Stach
2012-12-18 8:21 ` Mark Zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).