* [PATCH] drm/i915: fix short vs. long hpd detection
@ 2014-10-02 8:16 Jani Nikula
2014-10-02 8:26 ` Daniel Vetter
0 siblings, 1 reply; 7+ messages in thread
From: Jani Nikula @ 2014-10-02 8:16 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
Fix short vs. long hpd detection for non-g4x and non-pch split
platforms.
Broken since introduction in
commit 13cf550448b58abf8f44f5d6a560f2d20871c965
Author: Dave Airlie <airlied@redhat.com>
Date: Wed Jun 18 11:29:35 2014 +1000
drm/i915: rework digital port IRQ handling (v2)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83175
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/i915_irq.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 72cb9397ecc5..3ff6f1bb594a 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1708,7 +1708,7 @@ static irqreturn_t gen8_gt_irq_handler(struct drm_device *dev,
#define HPD_STORM_DETECT_PERIOD 1000
#define HPD_STORM_THRESHOLD 5
-static int ilk_port_to_hotplug_shift(enum port port)
+static int pch_port_to_hotplug_shift(enum port port)
{
switch (port) {
case PORT_A:
@@ -1724,7 +1724,7 @@ static int ilk_port_to_hotplug_shift(enum port port)
}
}
-static int g4x_port_to_hotplug_shift(enum port port)
+static int i915_port_to_hotplug_shift(enum port port)
{
switch (port) {
case PORT_A:
@@ -1782,12 +1782,12 @@ static inline void intel_hpd_irq_handler(struct drm_device *dev,
if (port && dev_priv->hpd_irq_port[port]) {
bool long_hpd;
- if (IS_G4X(dev)) {
- dig_shift = g4x_port_to_hotplug_shift(port);
- long_hpd = (hotplug_trigger >> dig_shift) & PORTB_HOTPLUG_LONG_DETECT;
- } else {
- dig_shift = ilk_port_to_hotplug_shift(port);
+ if (HAS_PCH_SPLIT(dev)) {
+ dig_shift = pch_port_to_hotplug_shift(port);
long_hpd = (dig_hotplug_reg >> dig_shift) & PORTB_HOTPLUG_LONG_DETECT;
+ } else {
+ dig_shift = i915_port_to_hotplug_shift(port);
+ long_hpd = (hotplug_trigger >> dig_shift) & PORTB_HOTPLUG_LONG_DETECT;
}
DRM_DEBUG_DRIVER("digital hpd port %c - %s\n",
--
1.9.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] drm/i915: fix short vs. long hpd detection 2014-10-02 8:16 [PATCH] drm/i915: fix short vs. long hpd detection Jani Nikula @ 2014-10-02 8:26 ` Daniel Vetter 2014-10-15 7:43 ` Ville Syrjälä 0 siblings, 1 reply; 7+ messages in thread From: Daniel Vetter @ 2014-10-02 8:26 UTC (permalink / raw) To: Jani Nikula; +Cc: intel-gfx On Thu, Oct 02, 2014 at 11:16:32AM +0300, Jani Nikula wrote: > Fix short vs. long hpd detection for non-g4x and non-pch split > platforms. > > Broken since introduction in > commit 13cf550448b58abf8f44f5d6a560f2d20871c965 > Author: Dave Airlie <airlied@redhat.com> > Date: Wed Jun 18 11:29:35 2014 +1000 > > drm/i915: rework digital port IRQ handling (v2) > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83175 > Signed-off-by: Jani Nikula <jani.nikula@intel.com> > --- > drivers/gpu/drm/i915/i915_irq.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c > index 72cb9397ecc5..3ff6f1bb594a 100644 > --- a/drivers/gpu/drm/i915/i915_irq.c > +++ b/drivers/gpu/drm/i915/i915_irq.c > @@ -1708,7 +1708,7 @@ static irqreturn_t gen8_gt_irq_handler(struct drm_device *dev, > #define HPD_STORM_DETECT_PERIOD 1000 > #define HPD_STORM_THRESHOLD 5 > > -static int ilk_port_to_hotplug_shift(enum port port) > +static int pch_port_to_hotplug_shift(enum port port) > { > switch (port) { > case PORT_A: > @@ -1724,7 +1724,7 @@ static int ilk_port_to_hotplug_shift(enum port port) > } > } > > -static int g4x_port_to_hotplug_shift(enum port port) > +static int i915_port_to_hotplug_shift(enum port port) > { > switch (port) { > case PORT_A: > @@ -1782,12 +1782,12 @@ static inline void intel_hpd_irq_handler(struct drm_device *dev, > if (port && dev_priv->hpd_irq_port[port]) { > bool long_hpd; > > - if (IS_G4X(dev)) { > - dig_shift = g4x_port_to_hotplug_shift(port); > - long_hpd = (hotplug_trigger >> dig_shift) & PORTB_HOTPLUG_LONG_DETECT; > - } else { > - dig_shift = ilk_port_to_hotplug_shift(port); > + if (HAS_PCH_SPLIT(dev)) { > + dig_shift = pch_port_to_hotplug_shift(port); > long_hpd = (dig_hotplug_reg >> dig_shift) & PORTB_HOTPLUG_LONG_DETECT; Using the new HAS_GMCH_DISPLAY will probably survive longer (i.e. skl). -Daniel > + } else { > + dig_shift = i915_port_to_hotplug_shift(port); > + long_hpd = (hotplug_trigger >> dig_shift) & PORTB_HOTPLUG_LONG_DETECT; > } > > DRM_DEBUG_DRIVER("digital hpd port %c - %s\n", > -- > 1.9.1 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915: fix short vs. long hpd detection 2014-10-02 8:26 ` Daniel Vetter @ 2014-10-15 7:43 ` Ville Syrjälä 2014-10-15 7:51 ` Jani Nikula 0 siblings, 1 reply; 7+ messages in thread From: Ville Syrjälä @ 2014-10-15 7:43 UTC (permalink / raw) To: Daniel Vetter; +Cc: Jani Nikula, intel-gfx On Thu, Oct 02, 2014 at 10:26:58AM +0200, Daniel Vetter wrote: > On Thu, Oct 02, 2014 at 11:16:32AM +0300, Jani Nikula wrote: > > Fix short vs. long hpd detection for non-g4x and non-pch split > > platforms. > > > > Broken since introduction in > > commit 13cf550448b58abf8f44f5d6a560f2d20871c965 > > Author: Dave Airlie <airlied@redhat.com> > > Date: Wed Jun 18 11:29:35 2014 +1000 > > > > drm/i915: rework digital port IRQ handling (v2) > > > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83175 > > Signed-off-by: Jani Nikula <jani.nikula@intel.com> > > --- > > drivers/gpu/drm/i915/i915_irq.c | 14 +++++++------- > > 1 file changed, 7 insertions(+), 7 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c > > index 72cb9397ecc5..3ff6f1bb594a 100644 > > --- a/drivers/gpu/drm/i915/i915_irq.c > > +++ b/drivers/gpu/drm/i915/i915_irq.c > > @@ -1708,7 +1708,7 @@ static irqreturn_t gen8_gt_irq_handler(struct drm_device *dev, > > #define HPD_STORM_DETECT_PERIOD 1000 > > #define HPD_STORM_THRESHOLD 5 > > > > -static int ilk_port_to_hotplug_shift(enum port port) > > +static int pch_port_to_hotplug_shift(enum port port) > > { > > switch (port) { > > case PORT_A: > > @@ -1724,7 +1724,7 @@ static int ilk_port_to_hotplug_shift(enum port port) > > } > > } > > > > -static int g4x_port_to_hotplug_shift(enum port port) > > +static int i915_port_to_hotplug_shift(enum port port) > > { > > switch (port) { > > case PORT_A: > > @@ -1782,12 +1782,12 @@ static inline void intel_hpd_irq_handler(struct drm_device *dev, > > if (port && dev_priv->hpd_irq_port[port]) { > > bool long_hpd; > > > > - if (IS_G4X(dev)) { > > - dig_shift = g4x_port_to_hotplug_shift(port); > > - long_hpd = (hotplug_trigger >> dig_shift) & PORTB_HOTPLUG_LONG_DETECT; > > - } else { > > - dig_shift = ilk_port_to_hotplug_shift(port); > > + if (HAS_PCH_SPLIT(dev)) { > > + dig_shift = pch_port_to_hotplug_shift(port); > > long_hpd = (dig_hotplug_reg >> dig_shift) & PORTB_HOTPLUG_LONG_DETECT; > > Using the new HAS_GMCH_DISPLAY will probably survive longer (i.e. skl). Did we have a concenses on this? I want hpd on my BSW. > -Daniel > > > + } else { > > + dig_shift = i915_port_to_hotplug_shift(port); > > + long_hpd = (hotplug_trigger >> dig_shift) & PORTB_HOTPLUG_LONG_DETECT; > > } > > > > DRM_DEBUG_DRIVER("digital hpd port %c - %s\n", > > -- > > 1.9.1 > > > > _______________________________________________ > > Intel-gfx mailing list > > Intel-gfx@lists.freedesktop.org > > http://lists.freedesktop.org/mailman/listinfo/intel-gfx > > -- > Daniel Vetter > Software Engineer, Intel Corporation > +41 (0) 79 365 57 48 - http://blog.ffwll.ch > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Ville Syrjälä Intel OTC ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915: fix short vs. long hpd detection 2014-10-15 7:43 ` Ville Syrjälä @ 2014-10-15 7:51 ` Jani Nikula 2014-10-15 8:08 ` Ville Syrjälä 2014-10-15 8:09 ` Jani Nikula 0 siblings, 2 replies; 7+ messages in thread From: Jani Nikula @ 2014-10-15 7:51 UTC (permalink / raw) To: Ville Syrjälä, Daniel Vetter; +Cc: intel-gfx On Wed, 15 Oct 2014, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote: > On Thu, Oct 02, 2014 at 10:26:58AM +0200, Daniel Vetter wrote: >> On Thu, Oct 02, 2014 at 11:16:32AM +0300, Jani Nikula wrote: >> > Fix short vs. long hpd detection for non-g4x and non-pch split >> > platforms. >> > >> > Broken since introduction in >> > commit 13cf550448b58abf8f44f5d6a560f2d20871c965 >> > Author: Dave Airlie <airlied@redhat.com> >> > Date: Wed Jun 18 11:29:35 2014 +1000 >> > >> > drm/i915: rework digital port IRQ handling (v2) >> > >> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83175 >> > Signed-off-by: Jani Nikula <jani.nikula@intel.com> >> > --- >> > drivers/gpu/drm/i915/i915_irq.c | 14 +++++++------- >> > 1 file changed, 7 insertions(+), 7 deletions(-) >> > >> > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c >> > index 72cb9397ecc5..3ff6f1bb594a 100644 >> > --- a/drivers/gpu/drm/i915/i915_irq.c >> > +++ b/drivers/gpu/drm/i915/i915_irq.c >> > @@ -1708,7 +1708,7 @@ static irqreturn_t gen8_gt_irq_handler(struct drm_device *dev, >> > #define HPD_STORM_DETECT_PERIOD 1000 >> > #define HPD_STORM_THRESHOLD 5 >> > >> > -static int ilk_port_to_hotplug_shift(enum port port) >> > +static int pch_port_to_hotplug_shift(enum port port) >> > { >> > switch (port) { >> > case PORT_A: >> > @@ -1724,7 +1724,7 @@ static int ilk_port_to_hotplug_shift(enum port port) >> > } >> > } >> > >> > -static int g4x_port_to_hotplug_shift(enum port port) >> > +static int i915_port_to_hotplug_shift(enum port port) >> > { >> > switch (port) { >> > case PORT_A: >> > @@ -1782,12 +1782,12 @@ static inline void intel_hpd_irq_handler(struct drm_device *dev, >> > if (port && dev_priv->hpd_irq_port[port]) { >> > bool long_hpd; >> > >> > - if (IS_G4X(dev)) { >> > - dig_shift = g4x_port_to_hotplug_shift(port); >> > - long_hpd = (hotplug_trigger >> dig_shift) & PORTB_HOTPLUG_LONG_DETECT; >> > - } else { >> > - dig_shift = ilk_port_to_hotplug_shift(port); >> > + if (HAS_PCH_SPLIT(dev)) { >> > + dig_shift = pch_port_to_hotplug_shift(port); >> > long_hpd = (dig_hotplug_reg >> dig_shift) & PORTB_HOTPLUG_LONG_DETECT; >> >> Using the new HAS_GMCH_DISPLAY will probably survive longer (i.e. skl). > > Did we have a concenses on this? I want hpd on my BSW. Sorry, we agreed on IRC that the ifs were okay as-is, but we're still missing review. BR, Jani. > >> -Daniel >> >> > + } else { >> > + dig_shift = i915_port_to_hotplug_shift(port); >> > + long_hpd = (hotplug_trigger >> dig_shift) & PORTB_HOTPLUG_LONG_DETECT; >> > } >> > >> > DRM_DEBUG_DRIVER("digital hpd port %c - %s\n", >> > -- >> > 1.9.1 >> > >> > _______________________________________________ >> > Intel-gfx mailing list >> > Intel-gfx@lists.freedesktop.org >> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx >> >> -- >> Daniel Vetter >> Software Engineer, Intel Corporation >> +41 (0) 79 365 57 48 - http://blog.ffwll.ch >> _______________________________________________ >> Intel-gfx mailing list >> Intel-gfx@lists.freedesktop.org >> http://lists.freedesktop.org/mailman/listinfo/intel-gfx > > -- > Ville Syrjälä > Intel OTC -- Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915: fix short vs. long hpd detection 2014-10-15 7:51 ` Jani Nikula @ 2014-10-15 8:08 ` Ville Syrjälä 2014-10-16 12:09 ` Jani Nikula 2014-10-15 8:09 ` Jani Nikula 1 sibling, 1 reply; 7+ messages in thread From: Ville Syrjälä @ 2014-10-15 8:08 UTC (permalink / raw) To: Jani Nikula; +Cc: intel-gfx On Wed, Oct 15, 2014 at 10:51:54AM +0300, Jani Nikula wrote: > On Wed, 15 Oct 2014, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote: > > On Thu, Oct 02, 2014 at 10:26:58AM +0200, Daniel Vetter wrote: > >> On Thu, Oct 02, 2014 at 11:16:32AM +0300, Jani Nikula wrote: > >> > Fix short vs. long hpd detection for non-g4x and non-pch split > >> > platforms. > >> > > >> > Broken since introduction in > >> > commit 13cf550448b58abf8f44f5d6a560f2d20871c965 > >> > Author: Dave Airlie <airlied@redhat.com> > >> > Date: Wed Jun 18 11:29:35 2014 +1000 > >> > > >> > drm/i915: rework digital port IRQ handling (v2) > >> > > >> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83175 > >> > Signed-off-by: Jani Nikula <jani.nikula@intel.com> > >> > --- > >> > drivers/gpu/drm/i915/i915_irq.c | 14 +++++++------- > >> > 1 file changed, 7 insertions(+), 7 deletions(-) > >> > > >> > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c > >> > index 72cb9397ecc5..3ff6f1bb594a 100644 > >> > --- a/drivers/gpu/drm/i915/i915_irq.c > >> > +++ b/drivers/gpu/drm/i915/i915_irq.c > >> > @@ -1708,7 +1708,7 @@ static irqreturn_t gen8_gt_irq_handler(struct drm_device *dev, > >> > #define HPD_STORM_DETECT_PERIOD 1000 > >> > #define HPD_STORM_THRESHOLD 5 > >> > > >> > -static int ilk_port_to_hotplug_shift(enum port port) > >> > +static int pch_port_to_hotplug_shift(enum port port) > >> > { > >> > switch (port) { > >> > case PORT_A: > >> > @@ -1724,7 +1724,7 @@ static int ilk_port_to_hotplug_shift(enum port port) > >> > } > >> > } > >> > > >> > -static int g4x_port_to_hotplug_shift(enum port port) > >> > +static int i915_port_to_hotplug_shift(enum port port) > >> > { > >> > switch (port) { > >> > case PORT_A: > >> > @@ -1782,12 +1782,12 @@ static inline void intel_hpd_irq_handler(struct drm_device *dev, > >> > if (port && dev_priv->hpd_irq_port[port]) { > >> > bool long_hpd; > >> > > >> > - if (IS_G4X(dev)) { > >> > - dig_shift = g4x_port_to_hotplug_shift(port); > >> > - long_hpd = (hotplug_trigger >> dig_shift) & PORTB_HOTPLUG_LONG_DETECT; > >> > - } else { > >> > - dig_shift = ilk_port_to_hotplug_shift(port); > >> > + if (HAS_PCH_SPLIT(dev)) { > >> > + dig_shift = pch_port_to_hotplug_shift(port); > >> > long_hpd = (dig_hotplug_reg >> dig_shift) & PORTB_HOTPLUG_LONG_DETECT; > >> > >> Using the new HAS_GMCH_DISPLAY will probably survive longer (i.e. skl). > > > > Did we have a concenses on this? I want hpd on my BSW. > > Sorry, we agreed on IRC that the ifs were okay as-is, but we're still > missing review. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Although after checking the spec it does look like HAS_GMCH_DISPLAY might be a bit more future proof. > > BR, > Jani. > > > > > > > >> -Daniel > >> > >> > + } else { > >> > + dig_shift = i915_port_to_hotplug_shift(port); > >> > + long_hpd = (hotplug_trigger >> dig_shift) & PORTB_HOTPLUG_LONG_DETECT; > >> > } > >> > > >> > DRM_DEBUG_DRIVER("digital hpd port %c - %s\n", > >> > -- > >> > 1.9.1 > >> > > >> > _______________________________________________ > >> > Intel-gfx mailing list > >> > Intel-gfx@lists.freedesktop.org > >> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx > >> > >> -- > >> Daniel Vetter > >> Software Engineer, Intel Corporation > >> +41 (0) 79 365 57 48 - http://blog.ffwll.ch > >> _______________________________________________ > >> Intel-gfx mailing list > >> Intel-gfx@lists.freedesktop.org > >> http://lists.freedesktop.org/mailman/listinfo/intel-gfx > > > > -- > > Ville Syrjälä > > Intel OTC > > -- > Jani Nikula, Intel Open Source Technology Center -- Ville Syrjälä Intel OTC ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915: fix short vs. long hpd detection 2014-10-15 8:08 ` Ville Syrjälä @ 2014-10-16 12:09 ` Jani Nikula 0 siblings, 0 replies; 7+ messages in thread From: Jani Nikula @ 2014-10-16 12:09 UTC (permalink / raw) To: Ville Syrjälä; +Cc: intel-gfx On Wed, 15 Oct 2014, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote: > On Wed, Oct 15, 2014 at 10:51:54AM +0300, Jani Nikula wrote: >> On Wed, 15 Oct 2014, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote: >> > On Thu, Oct 02, 2014 at 10:26:58AM +0200, Daniel Vetter wrote: >> >> On Thu, Oct 02, 2014 at 11:16:32AM +0300, Jani Nikula wrote: >> >> > Fix short vs. long hpd detection for non-g4x and non-pch split >> >> > platforms. >> >> > >> >> > Broken since introduction in >> >> > commit 13cf550448b58abf8f44f5d6a560f2d20871c965 >> >> > Author: Dave Airlie <airlied@redhat.com> >> >> > Date: Wed Jun 18 11:29:35 2014 +1000 >> >> > >> >> > drm/i915: rework digital port IRQ handling (v2) >> >> > >> >> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83175 >> >> > Signed-off-by: Jani Nikula <jani.nikula@intel.com> >> >> > --- >> >> > drivers/gpu/drm/i915/i915_irq.c | 14 +++++++------- >> >> > 1 file changed, 7 insertions(+), 7 deletions(-) >> >> > >> >> > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c >> >> > index 72cb9397ecc5..3ff6f1bb594a 100644 >> >> > --- a/drivers/gpu/drm/i915/i915_irq.c >> >> > +++ b/drivers/gpu/drm/i915/i915_irq.c >> >> > @@ -1708,7 +1708,7 @@ static irqreturn_t gen8_gt_irq_handler(struct drm_device *dev, >> >> > #define HPD_STORM_DETECT_PERIOD 1000 >> >> > #define HPD_STORM_THRESHOLD 5 >> >> > >> >> > -static int ilk_port_to_hotplug_shift(enum port port) >> >> > +static int pch_port_to_hotplug_shift(enum port port) >> >> > { >> >> > switch (port) { >> >> > case PORT_A: >> >> > @@ -1724,7 +1724,7 @@ static int ilk_port_to_hotplug_shift(enum port port) >> >> > } >> >> > } >> >> > >> >> > -static int g4x_port_to_hotplug_shift(enum port port) >> >> > +static int i915_port_to_hotplug_shift(enum port port) >> >> > { >> >> > switch (port) { >> >> > case PORT_A: >> >> > @@ -1782,12 +1782,12 @@ static inline void intel_hpd_irq_handler(struct drm_device *dev, >> >> > if (port && dev_priv->hpd_irq_port[port]) { >> >> > bool long_hpd; >> >> > >> >> > - if (IS_G4X(dev)) { >> >> > - dig_shift = g4x_port_to_hotplug_shift(port); >> >> > - long_hpd = (hotplug_trigger >> dig_shift) & PORTB_HOTPLUG_LONG_DETECT; >> >> > - } else { >> >> > - dig_shift = ilk_port_to_hotplug_shift(port); >> >> > + if (HAS_PCH_SPLIT(dev)) { >> >> > + dig_shift = pch_port_to_hotplug_shift(port); >> >> > long_hpd = (dig_hotplug_reg >> dig_shift) & PORTB_HOTPLUG_LONG_DETECT; >> >> >> >> Using the new HAS_GMCH_DISPLAY will probably survive longer (i.e. skl). >> > >> > Did we have a concenses on this? I want hpd on my BSW. >> >> Sorry, we agreed on IRC that the ifs were okay as-is, but we're still >> missing review. > > Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > > Although after checking the spec it does look like HAS_GMCH_DISPLAY > might be a bit more future proof. Pushed to drm-intel-next-fixes, thanks for the review. BR, Jani. -- Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/i915: fix short vs. long hpd detection 2014-10-15 7:51 ` Jani Nikula 2014-10-15 8:08 ` Ville Syrjälä @ 2014-10-15 8:09 ` Jani Nikula 1 sibling, 0 replies; 7+ messages in thread From: Jani Nikula @ 2014-10-15 8:09 UTC (permalink / raw) To: Ville Syrjälä, Daniel Vetter; +Cc: intel-gfx On Wed, 15 Oct 2014, Jani Nikula <jani.nikula@intel.com> wrote: > On Wed, 15 Oct 2014, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote: >> On Thu, Oct 02, 2014 at 10:26:58AM +0200, Daniel Vetter wrote: >>> On Thu, Oct 02, 2014 at 11:16:32AM +0300, Jani Nikula wrote: >>> > Fix short vs. long hpd detection for non-g4x and non-pch split >>> > platforms. >>> > >>> > Broken since introduction in >>> > commit 13cf550448b58abf8f44f5d6a560f2d20871c965 >>> > Author: Dave Airlie <airlied@redhat.com> >>> > Date: Wed Jun 18 11:29:35 2014 +1000 >>> > >>> > drm/i915: rework digital port IRQ handling (v2) >>> > >>> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83175 >>> > Signed-off-by: Jani Nikula <jani.nikula@intel.com> >>> > --- >>> > drivers/gpu/drm/i915/i915_irq.c | 14 +++++++------- >>> > 1 file changed, 7 insertions(+), 7 deletions(-) >>> > >>> > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c >>> > index 72cb9397ecc5..3ff6f1bb594a 100644 >>> > --- a/drivers/gpu/drm/i915/i915_irq.c >>> > +++ b/drivers/gpu/drm/i915/i915_irq.c >>> > @@ -1708,7 +1708,7 @@ static irqreturn_t gen8_gt_irq_handler(struct drm_device *dev, >>> > #define HPD_STORM_DETECT_PERIOD 1000 >>> > #define HPD_STORM_THRESHOLD 5 >>> > >>> > -static int ilk_port_to_hotplug_shift(enum port port) >>> > +static int pch_port_to_hotplug_shift(enum port port) >>> > { >>> > switch (port) { >>> > case PORT_A: >>> > @@ -1724,7 +1724,7 @@ static int ilk_port_to_hotplug_shift(enum port port) >>> > } >>> > } >>> > >>> > -static int g4x_port_to_hotplug_shift(enum port port) >>> > +static int i915_port_to_hotplug_shift(enum port port) >>> > { >>> > switch (port) { >>> > case PORT_A: >>> > @@ -1782,12 +1782,12 @@ static inline void intel_hpd_irq_handler(struct drm_device *dev, >>> > if (port && dev_priv->hpd_irq_port[port]) { >>> > bool long_hpd; >>> > >>> > - if (IS_G4X(dev)) { >>> > - dig_shift = g4x_port_to_hotplug_shift(port); >>> > - long_hpd = (hotplug_trigger >> dig_shift) & PORTB_HOTPLUG_LONG_DETECT; >>> > - } else { >>> > - dig_shift = ilk_port_to_hotplug_shift(port); >>> > + if (HAS_PCH_SPLIT(dev)) { >>> > + dig_shift = pch_port_to_hotplug_shift(port); >>> > long_hpd = (dig_hotplug_reg >> dig_shift) & PORTB_HOTPLUG_LONG_DETECT; >>> >>> Using the new HAS_GMCH_DISPLAY will probably survive longer (i.e. skl). >> >> Did we have a concenses on this? I want hpd on my BSW. > > Sorry, we agreed on IRC that the ifs were okay as-is, but we're still > missing review. Even a tested-by would be welcome! Jani. > > BR, > Jani. > > > > >> >>> -Daniel >>> >>> > + } else { >>> > + dig_shift = i915_port_to_hotplug_shift(port); >>> > + long_hpd = (hotplug_trigger >> dig_shift) & PORTB_HOTPLUG_LONG_DETECT; >>> > } >>> > >>> > DRM_DEBUG_DRIVER("digital hpd port %c - %s\n", >>> > -- >>> > 1.9.1 >>> > >>> > _______________________________________________ >>> > Intel-gfx mailing list >>> > Intel-gfx@lists.freedesktop.org >>> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx >>> >>> -- >>> Daniel Vetter >>> Software Engineer, Intel Corporation >>> +41 (0) 79 365 57 48 - http://blog.ffwll.ch >>> _______________________________________________ >>> Intel-gfx mailing list >>> Intel-gfx@lists.freedesktop.org >>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx >> >> -- >> Ville Syrjälä >> Intel OTC > > -- > Jani Nikula, Intel Open Source Technology Center > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-10-16 12:10 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-10-02 8:16 [PATCH] drm/i915: fix short vs. long hpd detection Jani Nikula 2014-10-02 8:26 ` Daniel Vetter 2014-10-15 7:43 ` Ville Syrjälä 2014-10-15 7:51 ` Jani Nikula 2014-10-15 8:08 ` Ville Syrjälä 2014-10-16 12:09 ` Jani Nikula 2014-10-15 8:09 ` Jani Nikula
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox