drm/i915: fix short vs. long hpd detection
Subsystems (2)
PATCH 1/1 drm/i915: fix short vs. long hpd detection
Fix short vs. long hpd detection for non-g4x and non-pch split platforms.
Broken since introduction in
commit 13cf550448b58abf8f44f5d6a560f2d20871c965
Author: Dave Airlie <[email protected]> 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
--- drivers/gpu/drm/i915/i915_irq.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/i915_irq.c +7 -7
@@ -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",
Signature · 1 line
1.9.1
Quoted 40 lines · Jani Nikula
Fix short vs. long hpd detection for non-g4x and non-pch split platforms.
Broken since introduction in
commit13cf550448b58abf8f44f5d6a560f2d20871c965Author: Dave Airlie <[email protected]> Date: Wed Jun 18 11:29:35 2014 +1000drm/i915: rework digital port IRQ handling (v2)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83175
Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/i915_irq.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)drivers/gpu/drm/i915/i915_irq.c +2
-2@@ -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]) {
drivers/gpu/drm/i915/i915_irq.c static inline void intel_hpd_irq_handler(struct drm_device *dev, · line 1787
Quoted 10 lines
drivers/gpu/drm/i915/i915_irq.c +2
-5bool 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
Quoted 13 lines
drivers/gpu/drm/i915/i915_irq.c +3
-0+ }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",Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 43 lines · Daniel Vetter
Quoted 42 lines · Jani Nikula
Fix short vs. long hpd detection for non-g4x and non-pch split platforms.
Broken since introduction in
commit13cf550448b58abf8f44f5d6a560f2d20871c965Author: Dave Airlie <[email protected]> Date: Wed Jun 18 11:29:35 2014 +1000drm/i915: rework digital port IRQ handling (v2)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83175
Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/i915_irq.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)drivers/gpu/drm/i915/i915_irq.c +2
-2@@ -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;
Quoted 10 lines
drivers/gpu/drm/i915/i915_irq.c static inline void intel_hpd_irq_handler(struct drm_device *dev, · line 1787
Quoted 8 lines
drivers/gpu/drm/i915/i915_irq.c +2
-5-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_DISPLAYwill probably survive longer (i.e. skl).
Did we have a concenses on this? I want hpd on my BSW.
Quoted 24 lines
-Daniel
Quoted 13 lines
drivers/gpu/drm/i915/i915_irq.c +3
-0+ }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",Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Ville Syrjälä Intel OTC
Quoted 55 lines · Ville Syrjälä
Quoted 43 lines · Daniel Vetter
Quoted 42 lines · Jani Nikula
Fix short vs. long hpd detection for non-g4x and non-pch split platforms.
Broken since introduction in
commit13cf550448b58abf8f44f5d6a560f2d20871c965Author: Dave Airlie <[email protected]> Date: Wed Jun 18 11:29:35 2014 +1000drm/i915: rework digital port IRQ handling (v2)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83175
Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/i915_irq.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)drivers/gpu/drm/i915/i915_irq.c +2
-2@@ -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;Quoted 10 lines
drivers/gpu/drm/i915/i915_irq.c static inline void intel_hpd_irq_handler(struct drm_device *dev, · line 1787
Quoted 8 lines
drivers/gpu/drm/i915/i915_irq.c +2
-5-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_DISPLAYwill probably survive longer (i.e. skl).
Quoted 1 line
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.
Quoted 29 lines
Quoted 25 lines
-Daniel
Quoted 13 lines
drivers/gpu/drm/i915/i915_irq.c +3
-0+ }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",Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 2 lines
Ville Syrjälä Intel OTC
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Ville Syrjälä
Reviewed-byQuoted 56 lines · Jani Nikula
Quoted 55 lines · Ville Syrjälä
Quoted 53 lines · Daniel Vetter
Quoted 40 lines · Jani Nikula
Fix short vs. long hpd detection for non-g4x and non-pch split platforms.
Broken since introduction in
commit13cf550448b58abf8f44f5d6a560f2d20871c965Author: Dave Airlie <[email protected]> Date: Wed Jun 18 11:29:35 2014 +1000drm/i915: rework digital port IRQ handling (v2)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83175
Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/i915_irq.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)drivers/gpu/drm/i915/i915_irq.c +2
-2@@ -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]) {drivers/gpu/drm/i915/i915_irq.c static inline void intel_hpd_irq_handler(struct drm_device *dev, · line 1787
Quoted 10 lines
drivers/gpu/drm/i915/i915_irq.c +2
-5bool 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_DISPLAYwill probably survive longer (i.e. skl).
Quoted 4 lines
Quoted 1 line
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.
Although after checking the spec it does look like HAS_GMCH_DISPLAY might be a bit more future proof.
Quoted 39 lines
BR,
Jani.Quoted 29 lines
Quoted 25 lines
-Daniel
Quoted 13 lines
drivers/gpu/drm/i915/i915_irq.c +3
-0+ }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",Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 2 lines
Ville Syrjälä Intel OTCSignature · 1 line
Jani Nikula, Intel Open Source Technology Center
Signature · 2 lines
Ville Syrjälä Intel OTC
Jani Nikula
AppliedQuoted 59 lines · Ville Syrjälä
Quoted 58 lines · Jani Nikula
Quoted 56 lines · Ville Syrjälä
Quoted 43 lines · Daniel Vetter
Quoted 42 lines · Jani Nikula
Fix short vs. long hpd detection for non-g4x and non-pch split platforms.
Broken since introduction in
commit13cf550448b58abf8f44f5d6a560f2d20871c965Author: Dave Airlie <[email protected]> Date: Wed Jun 18 11:29:35 2014 +1000drm/i915: rework digital port IRQ handling (v2)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83175
Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/i915_irq.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)drivers/gpu/drm/i915/i915_irq.c +2
-2@@ -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;Quoted 10 lines
drivers/gpu/drm/i915/i915_irq.c static inline void intel_hpd_irq_handler(struct drm_device *dev, · line 1787
Quoted 8 lines
drivers/gpu/drm/i915/i915_irq.c +2
-5-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_DISPLAYwill probably survive longer (i.e. skl).Did we have a concenses on this? I want hpd on my BSW.
Quoted 7 lines
Quoted 2 lines
Sorry, we agreed on IRC that the ifs were okay as-is, but we're still missing review.
Reviewed-by Ville Syrjälä <[email protected]>Although after checking the spec it does look like
HAS_GMCH_DISPLAYmight be a bit more future proof.
Pushed to drm-intel-next-fixes, thanks for the review.
BR,
Jani.
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 56 lines · Jani Nikula
Quoted 55 lines · Ville Syrjälä
Quoted 53 lines · Daniel Vetter
Quoted 40 lines · Jani Nikula
Fix short vs. long hpd detection for non-g4x and non-pch split platforms.
Broken since introduction in
commit13cf550448b58abf8f44f5d6a560f2d20871c965Author: Dave Airlie <[email protected]> Date: Wed Jun 18 11:29:35 2014 +1000drm/i915: rework digital port IRQ handling (v2)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83175
Signed-off-by Jani Nikula <[email protected]>--- drivers/gpu/drm/i915/i915_irq.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)drivers/gpu/drm/i915/i915_irq.c +2
-2@@ -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]) {drivers/gpu/drm/i915/i915_irq.c static inline void intel_hpd_irq_handler(struct drm_device *dev, · line 1787
Quoted 10 lines
drivers/gpu/drm/i915/i915_irq.c +2
-5bool 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_DISPLAYwill probably survive longer (i.e. skl).
Quoted 4 lines
Quoted 1 line
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.
Quoted 43 lines
BR,
Jani.Quoted 29 lines
Quoted 25 lines
-Daniel
Quoted 13 lines
drivers/gpu/drm/i915/i915_irq.c +3
-0+ }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",Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfxSignature · 2 lines
Ville Syrjälä Intel OTCSignature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx