diff mbox

drm/i915: Initialize HDMI connectors as HDMI, not DVI.

Message ID 1253732909-27817-1-git-send-email-ajax@redhat.com (mailing list archive)
State Accepted
Headers show

Commit Message

Adam Jackson Sept. 23, 2009, 7:08 p.m. UTC
Signed-off-by: Adam Jackson <ajax@redhat.com>
---
 drivers/gpu/drm/i915/intel_hdmi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Eric Anholt Sept. 23, 2009, 8:17 p.m. UTC | #1
On Wed, 2009-09-23 at 15:08 -0400, Adam Jackson wrote:
> Signed-off-by: Adam Jackson <ajax@redhat.com>
> ---
>  drivers/gpu/drm/i915/intel_hdmi.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index fa304e1..663ab6d 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -223,7 +223,7 @@ void intel_hdmi_init(struct drm_device *dev, int sdvox_reg)
>  
>  	connector = &intel_output->base;
>  	drm_connector_init(dev, connector, &intel_hdmi_connector_funcs,
> -			   DRM_MODE_CONNECTOR_DVID);
> +			   DRM_MODE_CONNECTOR_HDMIA);
>  	drm_connector_helper_add(connector, &intel_hdmi_connector_helper_funcs);
>  
>  	intel_output->type = INTEL_OUTPUT_HDMI;

This whole connector naming thing is bogus, given that both DVI and HDMI
connectors in the real world are driven by this output code, and we
don't know what connector's on the box.
Zhenyu Wang Sept. 24, 2009, 1:10 a.m. UTC | #2
On 2009.09.23 15:08:29 -0400, Adam Jackson wrote:
> Signed-off-by: Adam Jackson <ajax@redhat.com>
> ---
>  drivers/gpu/drm/i915/intel_hdmi.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index fa304e1..663ab6d 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -223,7 +223,7 @@ void intel_hdmi_init(struct drm_device *dev, int sdvox_reg)
>  
>  	connector = &intel_output->base;
>  	drm_connector_init(dev, connector, &intel_hdmi_connector_funcs,
> -			   DRM_MODE_CONNECTOR_DVID);
> +			   DRM_MODE_CONNECTOR_HDMIA);
>  	drm_connector_helper_add(connector, &intel_hdmi_connector_helper_funcs);
>  
>  	intel_output->type = INTEL_OUTPUT_HDMI;
> -- 
> 1.6.4.2
> 

This is correct when 'HDMI' digital port is really made as HDMI port on board,
but we've seen boards which actually link up with DVI-D port. ;)
Zhao, Yakui Sept. 24, 2009, 1:26 a.m. UTC | #3
On Thu, 2009-09-24 at 03:08 +0800, Adam Jackson wrote:
> Signed-off-by: Adam Jackson <ajax@redhat.com>
The HDMI is displayed instead of DVI.

Acked-by: Zhao Yakui <yakui.zhao@intel.com>

Thanks.
> ---
>  drivers/gpu/drm/i915/intel_hdmi.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index fa304e1..663ab6d 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -223,7 +223,7 @@ void intel_hdmi_init(struct drm_device *dev, int sdvox_reg)
>  
>  	connector = &intel_output->base;
>  	drm_connector_init(dev, connector, &intel_hdmi_connector_funcs,
> -			   DRM_MODE_CONNECTOR_DVID);
> +			   DRM_MODE_CONNECTOR_HDMIA);
>  	drm_connector_helper_add(connector, &intel_hdmi_connector_helper_funcs);
>  
>  	intel_output->type = INTEL_OUTPUT_HDMI;
Adam Jackson Sept. 24, 2009, 3:16 p.m. UTC | #4
On Thu, 2009-09-24 at 09:10 +0800, Zhenyu Wang wrote:
> On 2009.09.23 15:08:29 -0400, Adam Jackson wrote:
> > Signed-off-by: Adam Jackson <ajax@redhat.com>
> > ---
> >  drivers/gpu/drm/i915/intel_hdmi.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> > index fa304e1..663ab6d 100644
> > --- a/drivers/gpu/drm/i915/intel_hdmi.c
> > +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> > @@ -223,7 +223,7 @@ void intel_hdmi_init(struct drm_device *dev, int sdvox_reg)
> >  
> >  	connector = &intel_output->base;
> >  	drm_connector_init(dev, connector, &intel_hdmi_connector_funcs,
> > -			   DRM_MODE_CONNECTOR_DVID);
> > +			   DRM_MODE_CONNECTOR_HDMIA);
> >  	drm_connector_helper_add(connector, &intel_hdmi_connector_helper_funcs);
> >  
> >  	intel_output->type = INTEL_OUTPUT_HDMI;
> > -- 
> > 1.6.4.2
> > 
> 
> This is correct when 'HDMI' digital port is really made as HDMI port on board,
> but we've seen boards which actually link up with DVI-D port. ;)

That's fine.  Labeling it as HDMI in RANDR will mean users will know
they can use a DVI->HDMI converter and be able to send audio over that
port.

- ajax
Zhenyu Wang Sept. 25, 2009, 1:58 a.m. UTC | #5
On 2009.09.24 11:16:53 -0400, Adam Jackson wrote:
> On Thu, 2009-09-24 at 09:10 +0800, Zhenyu Wang wrote:
> > On 2009.09.23 15:08:29 -0400, Adam Jackson wrote:
> > > Signed-off-by: Adam Jackson <ajax@redhat.com>
> > > ---
> > >  drivers/gpu/drm/i915/intel_hdmi.c |    2 +-
> > >  1 files changed, 1 insertions(+), 1 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> > > index fa304e1..663ab6d 100644
> > > --- a/drivers/gpu/drm/i915/intel_hdmi.c
> > > +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> > > @@ -223,7 +223,7 @@ void intel_hdmi_init(struct drm_device *dev, int sdvox_reg)
> > >  
> > >  	connector = &intel_output->base;
> > >  	drm_connector_init(dev, connector, &intel_hdmi_connector_funcs,
> > > -			   DRM_MODE_CONNECTOR_DVID);
> > > +			   DRM_MODE_CONNECTOR_HDMIA);
> > >  	drm_connector_helper_add(connector, &intel_hdmi_connector_helper_funcs);
> > >  
> > >  	intel_output->type = INTEL_OUTPUT_HDMI;
> > > -- 
> > > 1.6.4.2
> > > 
> > 
> > This is correct when 'HDMI' digital port is really made as HDMI port on board,
> > but we've seen boards which actually link up with DVI-D port. ;)
> 
> That's fine.  Labeling it as HDMI in RANDR will mean users will know
> they can use a DVI->HDMI converter and be able to send audio over that
> port.
> 

maybe the ideal solution would be to fix drm connector type assign, which should
be removed from connector init time, and provide new connector type setting function,
as the real physical connection type is normally known at connector probe time, e.g HDMI/DVI,
TV, etc.

For HDMI, we already have drm_detect_hdmi_monitor() helper.
Dave Airlie Sept. 25, 2009, 8:46 a.m. UTC | #6
On Fri, Sep 25, 2009 at 11:58 AM, Zhenyu Wang <zhenyuw@linux.intel.com> wrote:
> On 2009.09.24 11:16:53 -0400, Adam Jackson wrote:
>> On Thu, 2009-09-24 at 09:10 +0800, Zhenyu Wang wrote:
>> > On 2009.09.23 15:08:29 -0400, Adam Jackson wrote:
>> > > Signed-off-by: Adam Jackson <ajax@redhat.com>
>> > > ---
>> > >  drivers/gpu/drm/i915/intel_hdmi.c |    2 +-
>> > >  1 files changed, 1 insertions(+), 1 deletions(-)
>> > >
>> > > diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
>> > > index fa304e1..663ab6d 100644
>> > > --- a/drivers/gpu/drm/i915/intel_hdmi.c
>> > > +++ b/drivers/gpu/drm/i915/intel_hdmi.c
>> > > @@ -223,7 +223,7 @@ void intel_hdmi_init(struct drm_device *dev, int sdvox_reg)
>> > >
>> > >   connector = &intel_output->base;
>> > >   drm_connector_init(dev, connector, &intel_hdmi_connector_funcs,
>> > > -                    DRM_MODE_CONNECTOR_DVID);
>> > > +                    DRM_MODE_CONNECTOR_HDMIA);
>> > >   drm_connector_helper_add(connector, &intel_hdmi_connector_helper_funcs);
>> > >
>> > >   intel_output->type = INTEL_OUTPUT_HDMI;
>> > > --
>> > > 1.6.4.2
>> > >
>> >
>> > This is correct when 'HDMI' digital port is really made as HDMI port on board,
>> > but we've seen boards which actually link up with DVI-D port. ;)
>>
>> That's fine.  Labeling it as HDMI in RANDR will mean users will know
>> they can use a DVI->HDMI converter and be able to send audio over that
>> port.
>>
>
> maybe the ideal solution would be to fix drm connector type assign, which should
> be removed from connector init time, and provide new connector type setting function,
> as the real physical connection type is normally known at connector probe time, e.g HDMI/DVI,
> TV, etc.

Not sure how that can work, just report Unknown connectors until
someone plugs something in?

We need to specify connector for the cmdline support I added, so
having unknown that
changes to HDMI/DVI at runtime isn't really useful from a UI feedback
point of view, may
as well just set them all to Unknown if the driver can't figure it out
You should feedback to your
BIOS team so they know to fix this.

Dave.
Adam Jackson Sept. 25, 2009, 2:57 p.m. UTC | #7
On Fri, 2009-09-25 at 09:58 +0800, Zhenyu Wang wrote:
> On 2009.09.24 11:16:53 -0400, Adam Jackson wrote:
> > On Thu, 2009-09-24 at 09:10 +0800, Zhenyu Wang wrote:
> > > This is correct when 'HDMI' digital port is really made as HDMI port on board,
> > > but we've seen boards which actually link up with DVI-D port. ;)
> > 
> > That's fine.  Labeling it as HDMI in RANDR will mean users will know
> > they can use a DVI->HDMI converter and be able to send audio over that
> > port.
> 
> maybe the ideal solution would be to fix drm connector type assign, which should
> be removed from connector init time, and provide new connector type setting function,
> as the real physical connection type is normally known at connector probe time, e.g HDMI/DVI,
> TV, etc.

That seems like a lot of complexity to expose to the user for no real
gain.  People know HDMI is a superset of DVI.  If the connector can send
HDMI signals, we should let people know that.

If Intel VBIOSes had a real connector table - like the rest of the
civilized world - then we could reliably report the physical connector
[1].  They don't, so the best we can do is report the signaling
capabilities honestly.  We're already calling SDVO HDMI "HDMI"; let's
call integrated HDMI "HDMI" too.

> For HDMI, we already have drm_detect_hdmi_monitor() helper.

This is a property of the sink, not of the source.  Why would you change
the source's name based on a property of the sink?

[1] - Well, no, not really, since you can never really trust physical
connector tables, the OEM is both capable of lying and has no incentive
to tell the truth.

- ajax
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index fa304e1..663ab6d 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -223,7 +223,7 @@  void intel_hdmi_init(struct drm_device *dev, int sdvox_reg)
 
 	connector = &intel_output->base;
 	drm_connector_init(dev, connector, &intel_hdmi_connector_funcs,
-			   DRM_MODE_CONNECTOR_DVID);
+			   DRM_MODE_CONNECTOR_HDMIA);
 	drm_connector_helper_add(connector, &intel_hdmi_connector_helper_funcs);
 
 	intel_output->type = INTEL_OUTPUT_HDMI;