All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: fix gen4 digital port hotplug definitions
@ 2013-07-26  9:27 Daniel Vetter
  2013-07-26 10:21 ` Jani Nikula
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Vetter @ 2013-07-26  9:27 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Jan Niggemann, Egbert Eich

Apparently Bspec is wrong in this case here even for gm45. Note that
Bspec is horribly misguided on i965g/gm, so we don't have any other
data points besides that it seems to make machines work better.

With this changes all the bits in PORT_HOTPLUG_STAT for the digital
ports are ordered the same way. This seems to agree with what register
dumps from the hpd storm handling code shows, where the LIVE bit and
the short/long pulse STATUS bits light up at the same time with this
enumeration (but no with the one from Bspec).

Also tested on my gm45 which has two DP+ ports, and everything seems
to still work as expected.

References: http://www.mail-archive.com/intel-gfx@lists.freedesktop.org/msg23054.html
Cc: Egbert Eich <eich@suse.com>
Cc: Jan Niggemann <jn@hz6.de>
Tested-by: Jan Niggemann <jn@hz6.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/i915_reg.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 6caa748..2d4c884 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -1925,9 +1925,9 @@
 
 #define PORT_HOTPLUG_STAT	(dev_priv->info->display_mmio_offset + 0x61114)
 /* HDMI/DP bits are gen4+ */
-#define   PORTB_HOTPLUG_LIVE_STATUS               (1 << 29)
+#define   PORTD_HOTPLUG_LIVE_STATUS               (1 << 29)
 #define   PORTC_HOTPLUG_LIVE_STATUS               (1 << 28)
-#define   PORTD_HOTPLUG_LIVE_STATUS               (1 << 27)
+#define   PORTB_HOTPLUG_LIVE_STATUS               (1 << 27)
 #define   PORTD_HOTPLUG_INT_STATUS		(3 << 21)
 #define   PORTC_HOTPLUG_INT_STATUS		(3 << 19)
 #define   PORTB_HOTPLUG_INT_STATUS		(3 << 17)
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/i915: fix gen4 digital port hotplug definitions
  2013-07-26  9:27 [PATCH] drm/i915: fix gen4 digital port hotplug definitions Daniel Vetter
@ 2013-07-26 10:21 ` Jani Nikula
  2013-07-26 17:54   ` Daniel Vetter
  0 siblings, 1 reply; 5+ messages in thread
From: Jani Nikula @ 2013-07-26 10:21 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Jan Niggemann, Egbert Eich

On Fri, 26 Jul 2013, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Apparently Bspec is wrong in this case here even for gm45. Note that
> Bspec is horribly misguided on i965g/gm, so we don't have any other
> data points besides that it seems to make machines work better.
>
> With this changes all the bits in PORT_HOTPLUG_STAT for the digital
> ports are ordered the same way. This seems to agree with what register
> dumps from the hpd storm handling code shows, where the LIVE bit and
> the short/long pulse STATUS bits light up at the same time with this
> enumeration (but no with the one from Bspec).

Would a comment about this near the #defines be in order? To avoid the
"these values are all wrong per bspec" patches.

Cheers,
Jani.

> Also tested on my gm45 which has two DP+ ports, and everything seems
> to still work as expected.
>
> References: http://www.mail-archive.com/intel-gfx@lists.freedesktop.org/msg23054.html
> Cc: Egbert Eich <eich@suse.com>
> Cc: Jan Niggemann <jn@hz6.de>
> Tested-by: Jan Niggemann <jn@hz6.de>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/i915/i915_reg.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 6caa748..2d4c884 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -1925,9 +1925,9 @@
>  
>  #define PORT_HOTPLUG_STAT	(dev_priv->info->display_mmio_offset + 0x61114)
>  /* HDMI/DP bits are gen4+ */
> -#define   PORTB_HOTPLUG_LIVE_STATUS               (1 << 29)
> +#define   PORTD_HOTPLUG_LIVE_STATUS               (1 << 29)
>  #define   PORTC_HOTPLUG_LIVE_STATUS               (1 << 28)
> -#define   PORTD_HOTPLUG_LIVE_STATUS               (1 << 27)
> +#define   PORTB_HOTPLUG_LIVE_STATUS               (1 << 27)
>  #define   PORTD_HOTPLUG_INT_STATUS		(3 << 21)
>  #define   PORTC_HOTPLUG_INT_STATUS		(3 << 19)
>  #define   PORTB_HOTPLUG_INT_STATUS		(3 << 17)
> -- 
> 1.8.3.2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/i915: fix gen4 digital port hotplug definitions
  2013-07-26 10:21 ` Jani Nikula
@ 2013-07-26 17:54   ` Daniel Vetter
  2013-07-26 19:46     ` Daniel Vetter
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Vetter @ 2013-07-26 17:54 UTC (permalink / raw)
  To: Jani Nikula
  Cc: Daniel Vetter, Intel Graphics Development, Jan Niggemann,
	Egbert Eich

On Fri, Jul 26, 2013 at 01:21:48PM +0300, Jani Nikula wrote:
> On Fri, 26 Jul 2013, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> > Apparently Bspec is wrong in this case here even for gm45. Note that
> > Bspec is horribly misguided on i965g/gm, so we don't have any other
> > data points besides that it seems to make machines work better.
> >
> > With this changes all the bits in PORT_HOTPLUG_STAT for the digital
> > ports are ordered the same way. This seems to agree with what register
> > dumps from the hpd storm handling code shows, where the LIVE bit and
> > the short/long pulse STATUS bits light up at the same time with this
> > enumeration (but no with the one from Bspec).
> 
> Would a comment about this near the #defines be in order? To avoid the
> "these values are all wrong per bspec" patches.

Yeah, good idea, I'll add a comment when merging this.
-Daniel

> 
> Cheers,
> Jani.
> 
> > Also tested on my gm45 which has two DP+ ports, and everything seems
> > to still work as expected.
> >
> > References: http://www.mail-archive.com/intel-gfx@lists.freedesktop.org/msg23054.html
> > Cc: Egbert Eich <eich@suse.com>
> > Cc: Jan Niggemann <jn@hz6.de>
> > Tested-by: Jan Niggemann <jn@hz6.de>
> > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> > ---
> >  drivers/gpu/drm/i915/i915_reg.h | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> > index 6caa748..2d4c884 100644
> > --- a/drivers/gpu/drm/i915/i915_reg.h
> > +++ b/drivers/gpu/drm/i915/i915_reg.h
> > @@ -1925,9 +1925,9 @@
> >  
> >  #define PORT_HOTPLUG_STAT	(dev_priv->info->display_mmio_offset + 0x61114)
> >  /* HDMI/DP bits are gen4+ */
> > -#define   PORTB_HOTPLUG_LIVE_STATUS               (1 << 29)
> > +#define   PORTD_HOTPLUG_LIVE_STATUS               (1 << 29)
> >  #define   PORTC_HOTPLUG_LIVE_STATUS               (1 << 28)
> > -#define   PORTD_HOTPLUG_LIVE_STATUS               (1 << 27)
> > +#define   PORTB_HOTPLUG_LIVE_STATUS               (1 << 27)
> >  #define   PORTD_HOTPLUG_INT_STATUS		(3 << 21)
> >  #define   PORTC_HOTPLUG_INT_STATUS		(3 << 19)
> >  #define   PORTB_HOTPLUG_INT_STATUS		(3 << 17)
> > -- 
> > 1.8.3.2
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Jani Nikula, Intel Open Source Technology Center

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/i915: fix gen4 digital port hotplug definitions
  2013-07-26 17:54   ` Daniel Vetter
@ 2013-07-26 19:46     ` Daniel Vetter
  2013-09-06  8:38       ` Jan Niggemann
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Vetter @ 2013-07-26 19:46 UTC (permalink / raw)
  To: Jani Nikula
  Cc: Daniel Vetter, Intel Graphics Development, Jan Niggemann,
	Egbert Eich

On Fri, Jul 26, 2013 at 07:54:22PM +0200, Daniel Vetter wrote:
> On Fri, Jul 26, 2013 at 01:21:48PM +0300, Jani Nikula wrote:
> > On Fri, 26 Jul 2013, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> > > Apparently Bspec is wrong in this case here even for gm45. Note that
> > > Bspec is horribly misguided on i965g/gm, so we don't have any other
> > > data points besides that it seems to make machines work better.
> > >
> > > With this changes all the bits in PORT_HOTPLUG_STAT for the digital
> > > ports are ordered the same way. This seems to agree with what register
> > > dumps from the hpd storm handling code shows, where the LIVE bit and
> > > the short/long pulse STATUS bits light up at the same time with this
> > > enumeration (but no with the one from Bspec).
> > 
> > Would a comment about this near the #defines be in order? To avoid the
> > "these values are all wrong per bspec" patches.
> 
> Yeah, good idea, I'll add a comment when merging this.

Done and merged with your irc-ack.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/i915: fix gen4 digital port hotplug definitions
  2013-07-26 19:46     ` Daniel Vetter
@ 2013-09-06  8:38       ` Jan Niggemann
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Niggemann @ 2013-09-06  8:38 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development, Egbert Eich

Hi list,

Am 26.07.2013 21:46, schrieb Daniel Vetter:
> On Fri, Jul 26, 2013 at 07:54:22PM +0200, Daniel Vetter wrote:
>> On Fri, Jul 26, 2013 at 01:21:48PM +0300, Jani Nikula wrote:
>> > On Fri, 26 Jul 2013, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
>> > > Apparently Bspec is wrong in this case here even for gm45. Note 
>> that
>> > > Bspec is horribly misguided on i965g/gm, so we don't have any 
>> other
>> > > data points besides that it seems to make machines work better.
>> > >
>> > > With this changes all the bits in PORT_HOTPLUG_STAT for the 
>> digital
>> > > ports are ordered the same way. This seems to agree with what 
>> register
>> > > dumps from the hpd storm handling code shows, where the LIVE bit 
>> and
>> > > the short/long pulse STATUS bits light up at the same time with 
>> this
>> > > enumeration (but no with the one from Bspec).
>> >
>> > Would a comment about this near the #defines be in order? To avoid 
>> the
>> > "these values are all wrong per bspec" patches.
>>
>> Yeah, good idea, I'll add a comment when merging this.
>
> Done and merged with your irc-ack.
this made it in 3.11, is there any chance GKH will also merge this into 
3.10 longterm?
I'm too new in kernel development... What would need to be done to 
achieve that?

Regards
Jan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-09-06  8:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-26  9:27 [PATCH] drm/i915: fix gen4 digital port hotplug definitions Daniel Vetter
2013-07-26 10:21 ` Jani Nikula
2013-07-26 17:54   ` Daniel Vetter
2013-07-26 19:46     ` Daniel Vetter
2013-09-06  8:38       ` Jan Niggemann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.