drm/i915/bxt: WA for swapped HPD pins in A stepping
Subsystems (2)
PATCH 1/1 drm/i915/bxt: WA for swapped HPD pins in A stepping
As per bspec, on BXT A0/A1, sw needs to activate DDIA HPD logic and interrupts to check the external panel connection. And remove the redundant comment.
v2: Remove redundant IS_BROXTON check, Add comment about port C not connected, and rephrase the commit message to include only what we are doing here (Imre)
--- drivers/gpu/drm/i915/i915_irq.c | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-)
drivers/gpu/drm/i915/i915_irq.c +29 -9
@@ -88,7 +88,11 @@ static const u32 hpd_status_i915[HPD_NUM_PINS] = { [HPD_PORT_D ] =PORTD_HOTPLUG_INT_STATUS }; -/* BXT hpd list */ +/* Port C is not connected on bxt A0/A1 */ +static const u32 hpd_bxt_a0[HPD_NUM_PINS ] = { + [HPD_PORT_B ] =BXT_DE_PORT_HP_DDIA +}; +static const u32 hpd_bxt[HPD_NUM_PINS ] = { [HPD_PORT_B ] =BXT_DE_PORT_HP_DDIB , [HPD_PORT_C ] =BXT_DE_PORT_HP_DDIC
@@ -2257,6 +2261,7 @@ static void bxt_hpd_handler(struct drm_device *dev, uint32_t iir_status)struct drm_i915_private *dev_priv = dev->dev_private;u32 hp_control, hp_trigger;u32 pin_mask, long_mask; +const u32 *hpd;/* Get the status */ hp_trigger = iir_status &BXT_DE_PORT_HOTPLUG_MASK ;
@@ -2271,7 +2276,12 @@ static void bxt_hpd_handler(struct drm_device *dev, uint32_t iir_status)/* Clear sticky bits in hpd status */ I915_WRITE (BXT_HOTPLUG_CTL , hp_control); -pch_get_hpd_pins (&pin_mask, &long_mask, hp_trigger, hp_control, hpd_bxt); +if (INTEL_REVID (dev) <BXT_REVID_B0 ) + hpd = hpd_bxt_a0; +else + hpd = hpd_bxt; + +pch_get_hpd_pins (&pin_mask, &long_mask, hp_trigger, hp_control, hpd);intel_hpd_irq_handler (dev, pin_mask, long_mask); }
@@ -3315,8 +3325,15 @@ static void bxt_hpd_irq_setup(struct drm_device *dev)/* Now, enable HPD */ for_each_intel_encoder (dev, intel_encoder) {if (dev_priv->hotplug.stats[intel_encoder->hpd_pin].state - ==HPD_ENABLED ) - hotplug_port |= hpd_bxt[intel_encoder->hpd_pin]; + ==HPD_ENABLED ) { +const u32 *hpd; + +if (INTEL_REVID (dev) <BXT_REVID_B0 ) + hpd = hpd_bxt_a0; +else + hpd = hpd_bxt; + hotplug_port |= hpd[intel_encoder->hpd_pin]; + } }/* Mask all HPD control bits */
@@ -3324,11 +3341,14 @@ static void bxt_hpd_irq_setup(struct drm_device *dev)/* Enable requested port in hotplug control */ /* TODO: implement (short) HPD support on port A */ -WARN_ON_ONCE (hotplug_port &BXT_DE_PORT_HP_DDIA ); -if (hotplug_port &BXT_DE_PORT_HP_DDIB ) - hotplug_ctrl |=BXT_DDIB_HPD_ENABLE ; -if (hotplug_port &BXT_DE_PORT_HP_DDIC ) - hotplug_ctrl |=BXT_DDIC_HPD_ENABLE ; +if (INTEL_REVID (dev) <BXT_REVID_B0 && (hotplug_port &BXT_DE_PORT_HP_DDIA )) + hotplug_ctrl |=BXT_DDIA_HPD_ENABLE ; +else { +if (hotplug_port &BXT_DE_PORT_HP_DDIB ) + hotplug_ctrl |=BXT_DDIB_HPD_ENABLE ; +if (hotplug_port &BXT_DE_PORT_HP_DDIC ) + hotplug_ctrl |=BXT_DDIC_HPD_ENABLE ; + }I915_WRITE (BXT_HOTPLUG_CTL , hotplug_ctrl);/* Unmask DDI hotplug in IMR */
Signature · 6 lines
1.7.10.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 59 lines · Sonika Jindal
As per bspec, on BXT A0/A1, sw needs to activate DDIA HPD logic and interrupts to check the external panel connection. And remove the redundant comment.
v2: Remove redundant
IS_BROXTONcheck, Add comment about port C not connected, and rephrase the commit message to include only what we are doing here (Imre)Signed-off-by Sonika Jindal <[email protected]>--- drivers/gpu/drm/i915/i915_irq.c | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-)drivers/gpu/drm/i915/i915_irq.c +13
-4@@ -88,7 +88,11 @@ static const u32 hpd_status_i915[HPD_NUM_PINS] = { [HPD_PORT_D ] =PORTD_HOTPLUG_INT_STATUS }; -/* BXT hpd list */ +/* Port C is not connected on bxt A0/A1 */ +static const u32 hpd_bxt_a0[HPD_NUM_PINS ] = { + [HPD_PORT_B ] =BXT_DE_PORT_HP_DDIA +}; +static const u32 hpd_bxt[HPD_NUM_PINS ] = { [HPD_PORT_B ] =BXT_DE_PORT_HP_DDIB , [HPD_PORT_C ] =BXT_DE_PORT_HP_DDIC @@ -2257,6 +2261,7 @@ static void bxt_hpd_handler(struct drm_device *dev, uint32_t iir_status)struct drm_i915_private *dev_priv = dev->dev_private;u32 hp_control, hp_trigger;u32 pin_mask, long_mask; +const u32 *hpd;/* Get the status */ hp_trigger = iir_status &BXT_DE_PORT_HOTPLUG_MASK ;@@ -2271,7 +2276,12 @@ static void bxt_hpd_handler(struct drm_device *dev, uint32_t iir_status)/* Clear sticky bits in hpd status */ I915_WRITE (BXT_HOTPLUG_CTL , hp_control); -pch_get_hpd_pins (&pin_mask, &long_mask, hp_trigger, hp_control, hpd_bxt); +if (INTEL_REVID (dev) <BXT_REVID_B0 ) + hpd = hpd_bxt_a0; +else + hpd = hpd_bxt; + +pch_get_hpd_pins (&pin_mask, &long_mask, hp_trigger, hp_control, hpd);intel_hpd_irq_handler (dev, pin_mask, long_mask); }@@ -3315,8 +3325,15 @@ static void bxt_hpd_irq_setup(struct drm_device *dev)/* Now, enable HPD */ for_each_intel_encoder (dev, intel_encoder) {if (dev_priv->hotplug.stats[intel_encoder->hpd_pin].state - ==HPD_ENABLED ) - hotplug_port |= hpd_bxt[intel_encoder->hpd_pin]; + ==HPD_ENABLED ) {
drivers/gpu/drm/i915/i915_irq.c static void bxt_hpd_irq_setup(struct drm_device *dev) · line 3338
Quoted 10 lines
drivers/gpu/drm/i915/i915_irq.c +8
-0+const u32 *hpd; + +if (INTEL_REVID (dev) <BXT_REVID_B0 ) + hpd = hpd_bxt_a0; +else + hpd = hpd_bxt; + hotplug_port |= hpd[intel_encoder->hpd_pin]; + } }
hpd initialization can be moved out so it is done once instead of being repeated for each encoder.
drivers/gpu/drm/i915/i915_irq.c static void bxt_hpd_irq_setup(struct drm_device *dev) · line 3345
Quoted 12 lines
drivers/gpu/drm/i915/i915_irq.c +2
-5/* Mask all HPD control bits */ @@ -3324,11 +3341,14 @@ static void bxt_hpd_irq_setup(struct drm_device *dev)/* Enable requested port in hotplug control */ /* TODO: implement (short) HPD support on port A */ -WARN_ON_ONCE (hotplug_port &BXT_DE_PORT_HP_DDIA ); -if (hotplug_port &BXT_DE_PORT_HP_DDIB ) - hotplug_ctrl |=BXT_DDIB_HPD_ENABLE ; -if (hotplug_port &BXT_DE_PORT_HP_DDIC ) - hotplug_ctrl |=BXT_DDIC_HPD_ENABLE ; +if (INTEL_REVID (dev) <BXT_REVID_B0 && (hotplug_port &BXT_DE_PORT_HP_DDIA )) + hotplug_ctrl |=BXT_DDIA_HPD_ENABLE ;
can you add a comment here stating the swap in hpd pins ?
as i am not sure not everyone will first check the commit message for the change here.
Quoted 11 lines
drivers/gpu/drm/i915/i915_irq.c +6
-0+else { +if (hotplug_port &BXT_DE_PORT_HP_DDIB ) + hotplug_ctrl |=BXT_DDIB_HPD_ENABLE ; +if (hotplug_port &BXT_DE_PORT_HP_DDIC ) + hotplug_ctrl |=BXT_DDIC_HPD_ENABLE ; + }I915_WRITE (BXT_HOTPLUG_CTL , hotplug_ctrl);/* Unmask DDI hotplug in IMR */
Signature · 8 lines
regards, Sivakumar _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 68 lines · Sivakumar Thulasimani
Quoted 65 lines · Sonika Jindal
As per bspec, on BXT A0/A1, sw needs to activate DDIA HPD logic and interrupts to check the external panel connection. And remove the redundant comment.
v2: Remove redundant
IS_BROXTONcheck, Add comment about port C not connected, and rephrase the commit message to include only what we are doing here (Imre)Signed-off-by Sonika Jindal <[email protected]>--- drivers/gpu/drm/i915/i915_irq.c | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-)drivers/gpu/drm/i915/i915_irq.c +12
-2@@ -88,7 +88,11 @@ static const u32 hpd_status_i915[HPD_NUM_PINS] = { [HPD_PORT_D ] =PORTD_HOTPLUG_INT_STATUS }; -/* BXT hpd list */ +/* Port C is not connected on bxt A0/A1 */ +static const u32 hpd_bxt_a0[HPD_NUM_PINS ] = { + [HPD_PORT_B ] =BXT_DE_PORT_HP_DDIA +}; +static const u32 hpd_bxt[HPD_NUM_PINS ] = { [HPD_PORT_B ] =BXT_DE_PORT_HP_DDIB , [HPD_PORT_C ] =BXT_DE_PORT_HP_DDIC @@ -2257,6 +2261,7 @@ static void bxt_hpd_handler(struct drm_device *dev, uint32_t iir_status)struct drm_i915_private *dev_priv = dev->dev_private;u32 hp_control, hp_trigger;u32 pin_mask, long_mask; +const u32 *hpd;/* Get the status */ hp_trigger = iir_status &BXT_DE_PORT_HOTPLUG_MASK ;@@ -2271,7 +2276,12 @@ static void bxt_hpd_handler(struct drm_device *dev, uint32_t iir_status)/* Clear sticky bits in hpd status */ I915_WRITE (BXT_HOTPLUG_CTL , hp_control); -pch_get_hpd_pins (&pin_mask, &long_mask, hp_trigger, hp_control, hpd_bxt); +if (INTEL_REVID (dev) <BXT_REVID_B0 ) + hpd = hpd_bxt_a0; +else + hpd = hpd_bxt; + +pch_get_hpd_pins (&pin_mask, &long_mask, hp_trigger, hp_control, hpd);intel_hpd_irq_handler (dev, pin_mask, long_mask);}drivers/gpu/drm/i915/i915_irq.c +4
-2@@ -3315,8 +3325,15 @@ static void bxt_hpd_irq_setup(struct drm_device *dev)/* Now, enable HPD */ for_each_intel_encoder (dev, intel_encoder) {if (dev_priv->hotplug.stats[intel_encoder->hpd_pin].state - ==HPD_ENABLED ) - hotplug_port |= hpd_bxt[intel_encoder->hpd_pin]; + ==HPD_ENABLED ) { +const u32 *hpd; + +if (INTEL_REVID (dev) <BXT_REVID_B0 )
Quoted 8 lines
drivers/gpu/drm/i915/i915_irq.c static void bxt_hpd_irq_setup(struct drm_device *dev) · line 3337
Quoted 6 lines
drivers/gpu/drm/i915/i915_irq.c +5
-0+ hpd = hpd_bxt_a0; + else + hpd = hpd_bxt; + hotplug_port |= hpd[intel_encoder->hpd_pin]; + } }hpd initialization can be moved out so it is done once instead of being repeated for each encoder.
Sure.
Quoted 17 lines
Quoted 4 lines
drivers/gpu/drm/i915/i915_irq.c +0
-0/* Mask all HPD control bits */ @@ -3324,11 +3341,14 @@ static void bxt_hpd_irq_setup(struct drm_device *dev)drivers/gpu/drm/i915/i915_irq.c static void bxt_hpd_irq_setup(struct · line 3346
Quoted 10 lines
drivers/gpu/drm/i915/i915_irq.c +2
-5/* Enable requested port in hotplug control */ /* TODO: implement (short) HPD support on port A */ -WARN_ON_ONCE (hotplug_port &BXT_DE_PORT_HP_DDIA ); -if (hotplug_port &BXT_DE_PORT_HP_DDIB ) - hotplug_ctrl |=BXT_DDIB_HPD_ENABLE ; -if (hotplug_port &BXT_DE_PORT_HP_DDIC ) - hotplug_ctrl |=BXT_DDIC_HPD_ENABLE ; +if (INTEL_REVID (dev) <BXT_REVID_B0 && (hotplug_port &BXT_DE_PORT_HP_DDIA )) + hotplug_ctrl |=BXT_DDIA_HPD_ENABLE ;can you add a comment here stating the swap in hpd pins ? as i am not sure not everyone will first check the commit message for the change here.
Ok, I'l add
Quoted 12 lines
drivers/gpu/drm/i915/i915_irq.c static void bxt_hpd_irq_setup(struct drm_device *dev) · line 3354
Quoted 10 lines
drivers/gpu/drm/i915/i915_irq.c +6
-0+else { +if (hotplug_port &BXT_DE_PORT_HP_DDIB ) + hotplug_ctrl |=BXT_DDIB_HPD_ENABLE ; +if (hotplug_port &BXT_DE_PORT_HP_DDIC ) + hotplug_ctrl |=BXT_DDIC_HPD_ENABLE ; + }I915_WRITE (BXT_HOTPLUG_CTL , hotplug_ctrl);/* Unmask DDI hotplug in IMR */
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 drm/i915/bxt: WA for swapped HPD pins in A stepping
In reply to Sivakumar ThulasimaniAs per bspec, on BXT A0/A1, sw needs to activate DDIA HPD logic and interrupts to check the external panel connection. And remove the redundant comment.
v2: Remove redundant IS_BROXTON check, Add comment about port C not connected, and rephrase the commit message to include only what we are doing here (Imre)
v3: Add comment about the WA, move 'hpd' initialization outside for loop (Siva)
Also, remove few redundant comments from hpd handler (me)
--- drivers/gpu/drm/i915/i915_irq.c | 46 ++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 15 deletions(-)
drivers/gpu/drm/i915/i915_irq.c +31 -15
@@ -88,7 +88,14 @@ static const u32 hpd_status_i915[HPD_NUM_PINS] = { [HPD_PORT_D ] =PORTD_HOTPLUG_INT_STATUS }; -/* BXT hpd list */ +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and interrupts to check +* the external panel connection. Port C is not connected on bxt A0/A1 +*/ +static const u32 hpd_bxt_a0[HPD_NUM_PINS ] = { + [HPD_PORT_B ] =BXT_DE_PORT_HP_DDIA +}; +static const u32 hpd_bxt[HPD_NUM_PINS ] = { [HPD_PORT_B ] =BXT_DE_PORT_HP_DDIB , [HPD_PORT_C ] =BXT_DE_PORT_HP_DDIC
@@ -1967,6 +1974,7 @@ static void bxt_hpd_handler(struct drm_device *dev, uint32_t iir_status)struct drm_i915_private *dev_priv = dev->dev_private;u32 hp_control, hp_trigger;u32 pin_mask, long_mask; +const u32 *hpd;/* Get the status */ hp_trigger = iir_status &BXT_DE_PORT_HOTPLUG_MASK ;
@@ -1981,7 +1989,12 @@ static void bxt_hpd_handler(struct drm_device *dev, uint32_t iir_status)/* Clear sticky bits in hpd status */ I915_WRITE (BXT_HOTPLUG_CTL , hp_control); -pch_get_hpd_pins (&pin_mask, &long_mask, hp_trigger, hp_control, hpd_bxt); +if (INTEL_REVID (dev) <BXT_REVID_B0 ) + hpd = hpd_bxt_a0; +else + hpd = hpd_bxt; + +pch_get_hpd_pins (&pin_mask, &long_mask, hp_trigger, hp_control, hpd);intel_hpd_irq_handler (dev, pin_mask, long_mask); }
@@ -3021,31 +3034,34 @@ static void bxt_hpd_irq_setup(struct drm_device *dev)struct intel_encoder *intel_encoder;u32 hotplug_port =0 ;u32 hotplug_ctrl; +const u32 *hpd; -/* Now, enable HPD */ -for_each_intel_encoder (dev, intel_encoder) { +if (INTEL_REVID (dev) <BXT_REVID_B0 ) + hpd = hpd_bxt_a0; +else + hpd = hpd_bxt; + +for_each_intel_encoder (dev, intel_encoder)if (dev_priv->hotplug.stats[intel_encoder->hpd_pin].state ==HPD_ENABLED ) - hotplug_port |= hpd_bxt[intel_encoder->hpd_pin]; - } + hotplug_port |= hpd[intel_encoder->hpd_pin]; -/* Mask all HPD control bits */ hotplug_ctrl =I915_READ (BXT_HOTPLUG_CTL ) & ~BXT_HOTPLUG_CTL_MASK ; -/* Enable requested port in hotplug control */ /* TODO: implement (short) HPD support on port A */ -WARN_ON_ONCE (hotplug_port &BXT_DE_PORT_HP_DDIA ); -if (hotplug_port &BXT_DE_PORT_HP_DDIB ) - hotplug_ctrl |=BXT_DDIB_HPD_ENABLE ; -if (hotplug_port &BXT_DE_PORT_HP_DDIC ) - hotplug_ctrl |=BXT_DDIC_HPD_ENABLE ; +if (INTEL_REVID (dev) <BXT_REVID_B0 && (hotplug_port &BXT_DE_PORT_HP_DDIA )) + hotplug_ctrl |=BXT_DDIA_HPD_ENABLE ; +else { +if (hotplug_port &BXT_DE_PORT_HP_DDIB ) + hotplug_ctrl |=BXT_DDIB_HPD_ENABLE ; +if (hotplug_port &BXT_DE_PORT_HP_DDIC ) + hotplug_ctrl |=BXT_DDIC_HPD_ENABLE ; + }I915_WRITE (BXT_HOTPLUG_CTL , hotplug_ctrl); -/* Unmask DDI hotplug in IMR */ hotplug_ctrl =I915_READ (GEN8_DE_PORT_IMR ) & ~hotplug_port;I915_WRITE (GEN8_DE_PORT_IMR , hotplug_ctrl); -/* Enable DDI hotplug in IER */ hotplug_ctrl =I915_READ (GEN8_DE_PORT_IER ) | hotplug_port;I915_WRITE (GEN8_DE_PORT_IER , hotplug_ctrl);POSTING_READ (GEN8_DE_PORT_IER );
Signature · 6 lines
1.7.10.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 4 lines · Sonika Jindal
As per bspec, on BXT A0/A1, sw needs to activate DDIA HPD logic and interrupts to check the external panel connection. And remove the redundant comment.
Quoted 8 lines
v2: Remove redundant
IS_BROXTONcheck, Add comment about port C not connected, and rephrase the commit message to include only what we are doing here (Imre)
v3: Add comment about the WA, move 'hpd' initialization outside for loop (Siva)
Also, remove few redundant comments from hpd handler (me)Signed-off-by Sonika Jindal <[email protected]>
Can't we do this in two steps:
- Wire up port A hpd in a generic way.
- Add wa for bxt to use port A hpd in the various encoder setup functions where we assign intel_encoder->hpd_pin.
Currently that switchover is spread all through low-level functions, which makes this a bit confusion. Imo low-level code shouldn't treat hpd A as anything but hpd A since that's just confusing. And we already have the infrastructure for encoders to ask for any hpd pin they want really. -Daniel
Quoted 101 lines
--- drivers/gpu/drm/i915/i915_irq.c | 46 ++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 15 deletions(-)drivers/gpu/drm/i915/i915_irq.c +31
-15@@ -88,7 +88,14 @@ static const u32 hpd_status_i915[HPD_NUM_PINS] = { [HPD_PORT_D ] =PORTD_HOTPLUG_INT_STATUS }; -/* BXT hpd list */ +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and interrupts to check +* the external panel connection. Port C is not connected on bxt A0/A1 +*/ +static const u32 hpd_bxt_a0[HPD_NUM_PINS ] = { + [HPD_PORT_B ] =BXT_DE_PORT_HP_DDIA +}; +static const u32 hpd_bxt[HPD_NUM_PINS ] = { [HPD_PORT_B ] =BXT_DE_PORT_HP_DDIB , [HPD_PORT_C ] =BXT_DE_PORT_HP_DDIC @@ -1967,6 +1974,7 @@ static void bxt_hpd_handler(struct drm_device *dev, uint32_t iir_status)struct drm_i915_private *dev_priv = dev->dev_private;u32 hp_control, hp_trigger;u32 pin_mask, long_mask; +const u32 *hpd;/* Get the status */ hp_trigger = iir_status &BXT_DE_PORT_HOTPLUG_MASK ;@@ -1981,7 +1989,12 @@ static void bxt_hpd_handler(struct drm_device *dev, uint32_t iir_status)/* Clear sticky bits in hpd status */ I915_WRITE (BXT_HOTPLUG_CTL , hp_control); -pch_get_hpd_pins (&pin_mask, &long_mask, hp_trigger, hp_control, hpd_bxt); +if (INTEL_REVID (dev) <BXT_REVID_B0 ) + hpd = hpd_bxt_a0; +else + hpd = hpd_bxt; + +pch_get_hpd_pins (&pin_mask, &long_mask, hp_trigger, hp_control, hpd);intel_hpd_irq_handler (dev, pin_mask, long_mask); }@@ -3021,31 +3034,34 @@ static void bxt_hpd_irq_setup(struct drm_device *dev)struct intel_encoder *intel_encoder;u32 hotplug_port =0 ;u32 hotplug_ctrl; +const u32 *hpd; -/* Now, enable HPD */ -for_each_intel_encoder (dev, intel_encoder) { +if (INTEL_REVID (dev) <BXT_REVID_B0 ) + hpd = hpd_bxt_a0; +else + hpd = hpd_bxt; + +for_each_intel_encoder (dev, intel_encoder)if (dev_priv->hotplug.stats[intel_encoder->hpd_pin].state ==HPD_ENABLED ) - hotplug_port |= hpd_bxt[intel_encoder->hpd_pin]; - } + hotplug_port |= hpd[intel_encoder->hpd_pin]; -/* Mask all HPD control bits */ hotplug_ctrl =I915_READ (BXT_HOTPLUG_CTL ) & ~BXT_HOTPLUG_CTL_MASK ; -/* Enable requested port in hotplug control */ /* TODO: implement (short) HPD support on port A */ -WARN_ON_ONCE (hotplug_port &BXT_DE_PORT_HP_DDIA ); -if (hotplug_port &BXT_DE_PORT_HP_DDIB ) - hotplug_ctrl |=BXT_DDIB_HPD_ENABLE ; -if (hotplug_port &BXT_DE_PORT_HP_DDIC ) - hotplug_ctrl |=BXT_DDIC_HPD_ENABLE ; +if (INTEL_REVID (dev) <BXT_REVID_B0 && (hotplug_port &BXT_DE_PORT_HP_DDIA )) + hotplug_ctrl |=BXT_DDIA_HPD_ENABLE ; +else { +if (hotplug_port &BXT_DE_PORT_HP_DDIB ) + hotplug_ctrl |=BXT_DDIB_HPD_ENABLE ; +if (hotplug_port &BXT_DE_PORT_HP_DDIC ) + hotplug_ctrl |=BXT_DDIC_HPD_ENABLE ; + }I915_WRITE (BXT_HOTPLUG_CTL , hotplug_ctrl); -/* Unmask DDI hotplug in IMR */ hotplug_ctrl =I915_READ (GEN8_DE_PORT_IMR ) & ~hotplug_port;I915_WRITE (GEN8_DE_PORT_IMR , hotplug_ctrl); -/* Enable DDI hotplug in IER */ hotplug_ctrl =I915_READ (GEN8_DE_PORT_IER ) | hotplug_port;I915_WRITE (GEN8_DE_PORT_IER , hotplug_ctrl);POSTING_READ (GEN8_DE_PORT_IER );Signature · 6 lines
1.7.10.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 121 lines · Daniel Vetter
Quoted 4 lines · Sonika Jindal
As per bspec, on BXT A0/A1, sw needs to activate DDIA HPD logic and interrupts to check the external panel connection. And remove the redundant comment.
Quoted 8 lines
v2: Remove redundant
IS_BROXTONcheck, Add comment about port C not connected, and rephrase the commit message to include only what we are doing here (Imre)
v3: Add comment about the WA, move 'hpd' initialization outside for loop (Siva)
Also, remove few redundant comments from hpd handler (me)Signed-off-by Sonika Jindal <[email protected]>Can't we do this in two steps:
- Wire up port A hpd in a generic way.
- Add wa for bxt to use port A hpd in the various encoder setup functions where we assignintel_encoder->hpd_pin.Currently that switchover is spread all through low-level functions, which makes this a bit confusion. Imo low-level code shouldn't treat hpd A as anything but hpd A since that's just confusing. And we already have the infrastructure for encoders to ask for any hpd pin they want really. -Daniel
Quoted 97 lines
--- drivers/gpu/drm/i915/i915_irq.c | 46 ++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 15 deletions(-)drivers/gpu/drm/i915/i915_irq.c +31
-15@@ -88,7 +88,14 @@ static const u32 hpd_status_i915[HPD_NUM_PINS] = { [HPD_PORT_D ] =PORTD_HOTPLUG_INT_STATUS }; -/* BXT hpd list */ +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and interrupts to check +* the external panel connection. Port C is not connected on bxt A0/A1 +*/ +static const u32 hpd_bxt_a0[HPD_NUM_PINS ] = { + [HPD_PORT_B ] =BXT_DE_PORT_HP_DDIA +}; +static const u32 hpd_bxt[HPD_NUM_PINS ] = { [HPD_PORT_B ] =BXT_DE_PORT_HP_DDIB , [HPD_PORT_C ] =BXT_DE_PORT_HP_DDIC @@ -1967,6 +1974,7 @@ static void bxt_hpd_handler(struct drm_device *dev, uint32_t iir_status)struct drm_i915_private *dev_priv = dev->dev_private;u32 hp_control, hp_trigger;u32 pin_mask, long_mask; +const u32 *hpd;/* Get the status */ hp_trigger = iir_status &BXT_DE_PORT_HOTPLUG_MASK ;@@ -1981,7 +1989,12 @@ static void bxt_hpd_handler(struct drm_device *dev, uint32_t iir_status)/* Clear sticky bits in hpd status */ I915_WRITE (BXT_HOTPLUG_CTL , hp_control); -pch_get_hpd_pins (&pin_mask, &long_mask, hp_trigger, hp_control, hpd_bxt); +if (INTEL_REVID (dev) <BXT_REVID_B0 ) + hpd = hpd_bxt_a0; +else + hpd = hpd_bxt; + +pch_get_hpd_pins (&pin_mask, &long_mask, hp_trigger, hp_control, hpd);intel_hpd_irq_handler (dev, pin_mask, long_mask); }@@ -3021,31 +3034,34 @@ static void bxt_hpd_irq_setup(struct drm_device *dev)struct intel_encoder *intel_encoder;u32 hotplug_port =0 ;u32 hotplug_ctrl; +const u32 *hpd; -/* Now, enable HPD */ -for_each_intel_encoder (dev, intel_encoder) { +if (INTEL_REVID (dev) <BXT_REVID_B0 ) + hpd = hpd_bxt_a0; +else + hpd = hpd_bxt; + +for_each_intel_encoder (dev, intel_encoder)if (dev_priv->hotplug.stats[intel_encoder->hpd_pin].state ==HPD_ENABLED ) - hotplug_port |= hpd_bxt[intel_encoder->hpd_pin]; - } + hotplug_port |= hpd[intel_encoder->hpd_pin]; -/* Mask all HPD control bits */ hotplug_ctrl =I915_READ (BXT_HOTPLUG_CTL ) & ~BXT_HOTPLUG_CTL_MASK ; -/* Enable requested port in hotplug control */ /* TODO: implement (short) HPD support on port A */ -WARN_ON_ONCE (hotplug_port &BXT_DE_PORT_HP_DDIA ); -if (hotplug_port &BXT_DE_PORT_HP_DDIB ) - hotplug_ctrl |=BXT_DDIB_HPD_ENABLE ; -if (hotplug_port &BXT_DE_PORT_HP_DDIC ) - hotplug_ctrl |=BXT_DDIC_HPD_ENABLE ; +if (INTEL_REVID (dev) <BXT_REVID_B0 && (hotplug_port &BXT_DE_PORT_HP_DDIA )) + hotplug_ctrl |=BXT_DDIA_HPD_ENABLE ; +else { +if (hotplug_port &BXT_DE_PORT_HP_DDIB ) + hotplug_ctrl |=BXT_DDIB_HPD_ENABLE ; +if (hotplug_port &BXT_DE_PORT_HP_DDIC ) + hotplug_ctrl |=BXT_DDIC_HPD_ENABLE ; + }I915_WRITE (BXT_HOTPLUG_CTL , hotplug_ctrl); -/* Unmask DDI hotplug in IMR */ hotplug_ctrl =I915_READ (GEN8_DE_PORT_IMR ) & ~hotplug_port;I915_WRITE (GEN8_DE_PORT_IMR , hotplug_ctrl); -/* Enable DDI hotplug in IER */ hotplug_ctrl =I915_READ (GEN8_DE_PORT_IER ) | hotplug_port;I915_WRITE (GEN8_DE_PORT_IER , hotplug_ctrl);POSTING_READ (GEN8_DE_PORT_IER );Signature · 1 line
1.7.10.4
Quoted 6 lines
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Agreed, that is better.
Sonika,
lets split this into two patches,
one : will add HPD support for DDIA like it is already done for DDIB & C. second, will just update hpd_pin for A0/A1 systems as required and avoid explicit revision checks in irq.c file.
Signature · 8 lines
regards, Sivakumar _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/2 drm/i915/bxt: Add HPD support for DDIA
Also remove redundant comments.
--- drivers/gpu/drm/i915/i915_irq.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/i915_irq.c +3 -7
@@ -90,6 +90,7 @@ static const u32 hpd_status_i915[HPD_NUM_PINS] = {/* BXT hpd list */ static const u32 hpd_bxt[HPD_NUM_PINS ] = { + [HPD_PORT_A ] =BXT_DE_PORT_HP_DDIA , [HPD_PORT_B ] =BXT_DE_PORT_HP_DDIB , [HPD_PORT_C ] =BXT_DE_PORT_HP_DDIC };
@@ -3022,30 +3023,25 @@ static void bxt_hpd_irq_setup(struct drm_device *dev)u32 hotplug_port =0 ;u32 hotplug_ctrl; -/* Now, enable HPD */ for_each_intel_encoder (dev, intel_encoder) {if (dev_priv->hotplug.stats[intel_encoder->hpd_pin].state ==HPD_ENABLED ) hotplug_port |= hpd_bxt[intel_encoder->hpd_pin]; } -/* Mask all HPD control bits */ hotplug_ctrl =I915_READ (BXT_HOTPLUG_CTL ) & ~BXT_HOTPLUG_CTL_MASK ; -/* Enable requested port in hotplug control */ -/* TODO: implement (short) HPD support on port A */ -WARN_ON_ONCE (hotplug_port &BXT_DE_PORT_HP_DDIA ); +if (hotplug_port &BXT_DE_PORT_HP_DDIA ) + hotplug_ctrl |=BXT_DDIA_HPD_ENABLE ;if (hotplug_port &BXT_DE_PORT_HP_DDIB ) hotplug_ctrl |=BXT_DDIB_HPD_ENABLE ;if (hotplug_port &BXT_DE_PORT_HP_DDIC ) hotplug_ctrl |=BXT_DDIC_HPD_ENABLE ;I915_WRITE (BXT_HOTPLUG_CTL , hotplug_ctrl); -/* Unmask DDI hotplug in IMR */ hotplug_ctrl =I915_READ (GEN8_DE_PORT_IMR ) & ~hotplug_port;I915_WRITE (GEN8_DE_PORT_IMR , hotplug_ctrl); -/* Enable DDI hotplug in IER */ hotplug_ctrl =I915_READ (GEN8_DE_PORT_IER ) | hotplug_port;I915_WRITE (GEN8_DE_PORT_IER , hotplug_ctrl);POSTING_READ (GEN8_DE_PORT_IER );
Signature · 6 lines
1.7.10.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 drm/i915/bxt: WA for swapped HPD pins in A stepping
As per bspec, on BXT A0/A1, sw needs to activate DDIA HPD logic and interrupts to check the external panel connection and DDIC HPD logic for edp panel.
--- drivers/gpu/drm/i915/intel_dp.c | 18 ++++++++++++++++-- drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++++- 2 files changed, 24 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +16 -2
@@ -5869,10 +5869,24 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,/* Set up the hotplug pin. */ switch (port) {case PORT_A : - intel_encoder->hpd_pin =HPD_PORT_A ; +/* +* On BXT A0/A1, sw needs to activate DDIC HPD logic and +* interrupts to check the eDP panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_C ; +else + intel_encoder->hpd_pin =HPD_PORT_A ;break ;case PORT_B : - intel_encoder->hpd_pin =HPD_PORT_B ; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ; +else + intel_encoder->hpd_pin =HPD_PORT_B ;break ;case PORT_C : intel_encoder->hpd_pin =HPD_PORT_C ;
drivers/gpu/drm/i915/intel_hdmi.c +8 -1
@@ -2011,7 +2011,14 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, intel_hdmi->ddc_bus =GMBUS_PIN_1_BXT ; else intel_hdmi->ddc_bus = GMBUS_PIN_DPB; - intel_encoder->hpd_pin =HPD_PORT_B ; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ; +else + intel_encoder->hpd_pin =HPD_PORT_B ;break ;case PORT_C :if (IS_BROXTON (dev_priv))
Signature · 6 lines
1.7.10.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 5 lines · Sonika Jindal
As per bspec, on BXT A0/A1, sw needs to activate DDIA HPD logic and interrupts to check the external panel connection and DDIC HPD logic for edp panel.
Signed-off-by Sonika Jindal <[email protected]>
Yeah I think this is much clearer. Will pull in as soon as there's an r-b on these two.
Thanks, Daniel
Quoted 63 lines
--- drivers/gpu/drm/i915/intel_dp.c | 18 ++++++++++++++++-- drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++++- 2 files changed, 24 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_dp.c +16
-2@@ -5869,10 +5869,24 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,/* Set up the hotplug pin. */ switch (port) {case PORT_A : - intel_encoder->hpd_pin =HPD_PORT_A ; +/* +* On BXT A0/A1, sw needs to activate DDIC HPD logic and +* interrupts to check the eDP panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_C ; +else + intel_encoder->hpd_pin =HPD_PORT_A ;break ;case PORT_B : - intel_encoder->hpd_pin =HPD_PORT_B ; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ; +else + intel_encoder->hpd_pin =HPD_PORT_B ;break ;case PORT_C : intel_encoder->hpd_pin =HPD_PORT_C ;drivers/gpu/drm/i915/intel_hdmi.c +8
-1@@ -2011,7 +2011,14 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, intel_hdmi->ddc_bus =GMBUS_PIN_1_BXT ; else intel_hdmi->ddc_bus = GMBUS_PIN_DPB; - intel_encoder->hpd_pin =HPD_PORT_B ; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ; +else + intel_encoder->hpd_pin =HPD_PORT_B ;break ;case PORT_C :if (IS_BROXTON (dev_priv))Signature · 6 lines
1.7.10.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 31 lines · Sonika Jindal
As per bspec, on BXT A0/A1, sw needs to activate DDIA HPD logic and interrupts to check the external panel connection and DDIC HPD logic for edp panel.
Signed-off-by Sonika Jindal <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 18 ++++++++++++++++-- drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++++- 2 files changed, 24 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_dp.c +9
-2@@ -5869,10 +5869,24 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,/* Set up the hotplug pin. */ switch (port) {case PORT_A : - intel_encoder->hpd_pin =HPD_PORT_A ; +/* +* On BXT A0/A1, sw needs to activate DDIC HPD logic and +* interrupts to check the eDP panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_C ; +else + intel_encoder->hpd_pin =HPD_PORT_A ;break ;case PORT_B : - intel_encoder->hpd_pin =HPD_PORT_B ; +/*
drivers/gpu/drm/i915/intel_dp.c intel_dp_init_connector(struct intel_digital_port *intel_dig_port, · line 5892
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +7
-0+* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ; +else + intel_encoder->hpd_pin =HPD_PORT_B ;break ;case PORT_C : intel_encoder->hpd_pin =HPD_PORT_C ;
This won't work for a couple of reasons: atm i915_digport_work_func() assumes a fixed pin->port mapping, for example it'll call the HPD handler for the port A encoder for a short/long pulse event triggered via the HPD_PORT_A pin, whereas after the above patch you want to select port B's encoder on BXT A0/1. This could be fixed by setting up hotplug.irq_port in intel_ddi_init() according to the above change, or not using irq_port at all, but instead looking up the encoder the same way i915_hotplug_work_func() does using intel_encoder->hpd_pin.
The HPD_PORT_A HPD handling is missing in general, see for_each_hpd_pin() and intel_hpd_irq_handler()/is_dig_port.
So if going with the above way, these issues need to be addressed first.
--Imre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 43 lines · Imre Deak
Quoted 31 lines · Sonika Jindal
As per bspec, on BXT A0/A1, sw needs to activate DDIA HPD logic and interrupts to check the external panel connection and DDIC HPD logic for edp panel.
Signed-off-by Sonika Jindal <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 18 ++++++++++++++++-- drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++++- 2 files changed, 24 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_dp.c +9
-2@@ -5869,10 +5869,24 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,/* Set up the hotplug pin. */ switch (port) {case PORT_A : - intel_encoder->hpd_pin =HPD_PORT_A ; +/* +* On BXT A0/A1, sw needs to activate DDIC HPD logic and +* interrupts to check the eDP panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_C ; +else + intel_encoder->hpd_pin =HPD_PORT_A ;break ;case PORT_B : - intel_encoder->hpd_pin =HPD_PORT_B ; +/* drivers/gpu/drm/i915/intel_dp.c intel_dp_init_connector(struct intel_digital_port *intel_dig_port, · line 5892
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +7
-0+* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ; +else + intel_encoder->hpd_pin =HPD_PORT_B ;break ;case PORT_C : intel_encoder->hpd_pin =HPD_PORT_C ;
Quoted 9 lines
This won't work for a couple of reasons: atm
i915_digport_work_func()assumes a fixedpin->portmapping, for example it'll call the HPD handler for the port A encoder for a short/long pulse event triggered via theHPD_PORT_Apin, whereas after the above patch you want to select port B's encoder on BXT A0/1. This could be fixed by setting up hotplug.irq_port inintel_ddi_init()according to the above change, or not usingirq_portat all, but instead looking up the encoder the same wayi915_hotplug_work_func()does usingintel_encoder->hpd_pin.
Hmm, i didnt realize that.
Moving this check to intel_ddi_init, will again make the checks spread all over which we wanted to avoid since hpd_pin was in place. But looks like hpd_pin is only for i915_hotplug_work_func.
I feel we can move back to the older approach itself
What do you suggest?
Daniel, any comments?
Quoted 8 lines
The
HPD_PORT_AHPD handling is missing in general, seefor_each_hpd_pin()and intel_hpd_irq_handler()/is_dig_port.So if going with the above way, these issues need to be addressed first.
--Imre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 55 lines · Sonika
Quoted 43 lines · Imre Deak
Quoted 31 lines · Sonika Jindal
As per bspec, on BXT A0/A1, sw needs to activate DDIA HPD logic and interrupts to check the external panel connection and DDIC HPD logic for edp panel.
Signed-off-by Sonika Jindal <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 18 ++++++++++++++++-- drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++++- 2 files changed, 24 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_dp.c +9
-2@@ -5869,10 +5869,24 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,/* Set up the hotplug pin. */ switch (port) {case PORT_A : - intel_encoder->hpd_pin =HPD_PORT_A ; +/* +* On BXT A0/A1, sw needs to activate DDIC HPD logic and +* interrupts to check the eDP panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_C ; +else + intel_encoder->hpd_pin =HPD_PORT_A ;break ;case PORT_B : - intel_encoder->hpd_pin =HPD_PORT_B ; +/* drivers/gpu/drm/i915/intel_dp.c intel_dp_init_connector(struct intel_digital_port *intel_dig_port, · line 5892
Quoted 10 lines
drivers/gpu/drm/i915/intel_dp.c +7
-0+* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ; +else + intel_encoder->hpd_pin =HPD_PORT_B ;break ;case PORT_C : intel_encoder->hpd_pin =HPD_PORT_C ;Quoted 9 lines
This won't work for a couple of reasons: atm
i915_digport_work_func()assumes a fixedpin->portmapping, for example it'll call the HPD handler for the port A encoder for a short/long pulse event triggered via theHPD_PORT_Apin, whereas after the above patch you want to select port B's encoder on BXT A0/1. This could be fixed by setting up hotplug.irq_port inintel_ddi_init()according to the above change, or not usingirq_portat all, but instead looking up the encoder the same wayi915_hotplug_work_func()does usingintel_encoder->hpd_pin.
Quoted 7 lines
Hmm, i didnt realize that.
Moving this check tointel_ddi_init, will again make the checks spread all over which we wanted to avoid sincehpd_pinwas in place. But looks likehpd_pinis only fori915_hotplug_work_func. I feel we can move back to the older approach itself
What do you suggest?
But then we can remove these checks from here, and have it only in intel_ddi_init, right? So it should look fine.
For HPD_PORT_A, I think we can skip that part as of now.
Please suggest..
Quoted 8 lines
Daniel, any comments?
Quoted 6 lines
The
HPD_PORT_AHPD handling is missing in general, seefor_each_hpd_pin()and intel_hpd_irq_handler()/is_dig_port.So if going with the above way, these issues need to be addressed first.
Quoted 8 lines
Quoted 2 lines
--Imre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 49 lines · Sonika
Quoted 46 lines · Sonika
Quoted 43 lines · Imre Deak
Quoted 41 lines · Sonika Jindal
As per bspec, on BXT A0/A1, sw needs to activate DDIA HPD logic and interrupts to check the external panel connection and DDIC HPD logic for edp panel.
Signed-off-by Sonika Jindal <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 18 ++++++++++++++++-- drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++++- 2 files changed, 24 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_dp.c +16
-2@@ -5869,10 +5869,24 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,/* Set up the hotplug pin. */ switch (port) {case PORT_A : - intel_encoder->hpd_pin =HPD_PORT_A ; +/* +* On BXT A0/A1, sw needs to activate DDIC HPD logic and +* interrupts to check the eDP panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_C ; +else + intel_encoder->hpd_pin =HPD_PORT_A ;break ;case PORT_B : - intel_encoder->hpd_pin =HPD_PORT_B ; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ; +else + intel_encoder->hpd_pin =HPD_PORT_B ;break ;case PORT_C : intel_encoder->hpd_pin =HPD_PORT_C ;
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
This won't work for a couple of reasons: atm
i915_digport_work_func()assumes a fixedpin->portmapping, for example it'll call the HPD handler for the port A encoder for a short/long pulse event triggered via theHPD_PORT_Apin, whereas after the above patch you want to select port B's encoder on BXT A0/1. This could be fixed by setting up hotplug.irq_port inintel_ddi_init()according to the above change, or not usingirq_portat all, but instead looking up the encoder the same wayi915_hotplug_work_func()does usingintel_encoder->hpd_pin.
Yeah that's kinda a bug in digport_work_func, but that part is also a mess. Simplest would be to rename hotplug.irq_port to irq_pin and change the assignment for that too.
Quoted 7 lines
Quoted 7 lines
Hmm, i didnt realize that.
Moving this check tointel_ddi_init, will again make the checks spread all over which we wanted to avoid sincehpd_pinwas in place. But looks likehpd_pinis only fori915_hotplug_work_func. I feel we can move back to the older approach itself
What do you suggest?
Quoted 6 lines
But then we can remove these checks from here, and have it only in
intel_ddi_init, right? So it should look fine.For
HPD_PORT_A, I think we can skip that part as of now.Please suggest..
I still think that fake-handling hpd A in the low-level irq handler is massively confusing. And we need to change all the same parts anyway (i.e. you'd have to change the digport_work_func too with the old approach). -Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 73 lines · Daniel Vetter
Quoted 49 lines · Sonika
Quoted 46 lines · Sonika
Quoted 43 lines · Imre Deak
Quoted 41 lines · Sonika Jindal
As per bspec, on BXT A0/A1, sw needs to activate DDIA HPD logic and interrupts to check the external panel connection and DDIC HPD logic for edp panel.
Signed-off-by Sonika Jindal <[email protected]>--- drivers/gpu/drm/i915/intel_dp.c | 18 ++++++++++++++++-- drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++++- 2 files changed, 24 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_dp.c +16
-2@@ -5869,10 +5869,24 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,/* Set up the hotplug pin. */ switch (port) {case PORT_A : - intel_encoder->hpd_pin =HPD_PORT_A ; +/* +* On BXT A0/A1, sw needs to activate DDIC HPD logic and +* interrupts to check the eDP panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_C ; +else + intel_encoder->hpd_pin =HPD_PORT_A ;break ;case PORT_B : - intel_encoder->hpd_pin =HPD_PORT_B ; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ; +else + intel_encoder->hpd_pin =HPD_PORT_B ;break ;case PORT_C : intel_encoder->hpd_pin =HPD_PORT_C ;Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
This won't work for a couple of reasons: atm
i915_digport_work_func()assumes a fixedpin->portmapping, for example it'll call the HPD handler for the port A encoder for a short/long pulse event triggered via theHPD_PORT_Apin, whereas after the above patch you want to select port B's encoder on BXT A0/1. This could be fixed by setting up hotplug.irq_port inintel_ddi_init()according to the above change, or not usingirq_portat all, but instead looking up the encoder the same wayi915_hotplug_work_func()does usingintel_encoder->hpd_pin.Yeah that's kinda a bug in
digport_work_func, but that part is also a mess. Simplest would be to rename hotplug.irq_port toirq_pinand change the assignment for that too.Quoted 10 lines
Quoted 7 lines
Hmm, i didnt realize that.
Moving this check tointel_ddi_init, will again make the checks spread all over which we wanted to avoid sincehpd_pinwas in place. But looks likehpd_pinis only fori915_hotplug_work_func. I feel we can move back to the older approach itself
What do you suggest?But then we can remove these checks from here, and have it only in
intel_ddi_init, right? So it should look fine.
Quoted 8 lines
Quoted 3 lines
For
HPD_PORT_A, I think we can skip that part as of now.Please suggest..
I still think that fake-handling hpd A in the low-level irq handler is massively confusing. And we need to change all the same parts anyway (i.e. you'd have to change the
digport_work_functoo with the old approach). -Daniel
So, for now, I will just correct it in intel_ddi_init and leave the handling of HPD for port A untouched. I will only change the irq_port for external DP (port B). And the other part with hpd_pin to handle hdmi hotplug will remain as is. Please let me know if you see any issue in this.
Regards,
Sonika
Quoted 1 line
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 drm/i915/bxt: WA for swapped HPD pins in A stepping
As per bspec, on BXT A0/A1, sw needs to activate DDIA HPD logic and interrupts to check the external panel connection and DDIC HPD logic for edp panel.
v2: For DP, irq_port is used to determine the encoder instead of hpd_pin and removing the edp HPD logic because port A HPD is not present(Imre)
--- drivers/gpu/drm/i915/intel_ddi.c | 10 +++++++++- drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++++- 2 files changed, 17 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +9 -1
@@ -3225,7 +3225,15 @@ void intel_ddi_init(struct drm_device *dev, enum port port) goto err; intel_dig_port->hpd_pulse = intel_dp_hpd_pulse; - dev_priv->hotplug.irq_port[port] = intel_dig_port; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 ) + && port ==PORT_B ) + dev_priv->hotplug.irq_port[PORT_A ] = intel_dig_port; +else + dev_priv->hotplug.irq_port[port] = intel_dig_port; }/* In theory we don't need the encoder->type check, but leave it just in
drivers/gpu/drm/i915/intel_hdmi.c +8 -1
@@ -1973,7 +1973,14 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, intel_hdmi->ddc_bus =GMBUS_PIN_1_BXT ; else intel_hdmi->ddc_bus = GMBUS_PIN_DPB; - intel_encoder->hpd_pin =HPD_PORT_B ; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ; +else + intel_encoder->hpd_pin =HPD_PORT_B ;break ;case PORT_C :if (IS_BROXTON (dev_priv))
Signature · 6 lines
1.7.10.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 20 lines · Sonika Jindal
As per bspec, on BXT A0/A1, sw needs to activate DDIA HPD logic and interrupts to check the external panel connection and DDIC HPD logic for edp panel.
v2: For DP,
irq_portis used to determine the encoder instead ofhpd_pinand removing the edp HPD logic because port A HPD is not present(Imre)Signed-off-by Sonika Jindal <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 10 +++++++++- drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++++- 2 files changed, 17 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +0
-0@@ -3225,7 +3225,15 @@ void intel_ddi_init(struct drm_device *dev, enum port port) goto err;
drivers/gpu/drm/i915/intel_ddi.c void intel_ddi_init(struct drm_device *dev, enum port port) · line 3234
Quoted 10 lines
drivers/gpu/drm/i915/intel_ddi.c +7
-1intel_dig_port->hpd_pulse = intel_dp_hpd_pulse; - dev_priv->hotplug.irq_port[port] = intel_dig_port; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 ) + && port ==PORT_B ) + dev_priv->hotplug.irq_port[PORT_A ] = intel_dig_port;
This happens to work but is confusing. irq_port[PORT_A] will be set here already and the above will simply overwrite it without explanation. I would also handle the port == PORT_A case and not set irq_port for it.
The same swapping for hpd_pin is missing from intel_dp_init_connector().
Quoted 15 lines
drivers/gpu/drm/i915/intel_ddi.c +2
-0+else + dev_priv->hotplug.irq_port[port] = intel_dig_port; }/* In theory we don't need the encoder->type check, but leave it just in drivers/gpu/drm/i915/intel_hdmi.c +1
-1@@ -1973,7 +1973,14 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, intel_hdmi->ddc_bus =GMBUS_PIN_1_BXT ; else intel_hdmi->ddc_bus = GMBUS_PIN_DPB; - intel_encoder->hpd_pin =HPD_PORT_B ; +/*
drivers/gpu/drm/i915/intel_hdmi.c void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, · line 1986
Quoted 10 lines
drivers/gpu/drm/i915/intel_hdmi.c +7
-0+* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ; +else + intel_encoder->hpd_pin =HPD_PORT_B ;break ;case PORT_C :if (IS_BROXTON (dev_priv))
As I earlier pointed out with the above approach, you need to add support for HPD events on the HPD_PORT_A pin. If you look at the for_each_hpd_pin() macro and intel_hpd_irq_handler()/is_dig_port you'll notice that any interrupt event on the HPD_PORT_A pin will be ignored now.
--Imre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 61 lines · Imre Deak
Quoted 20 lines · Sonika Jindal
As per bspec, on BXT A0/A1, sw needs to activate DDIA HPD logic and interrupts to check the external panel connection and DDIC HPD logic for edp panel.
v2: For DP,
irq_portis used to determine the encoder instead ofhpd_pinand removing the edp HPD logic because port A HPD is not present(Imre)Signed-off-by Sonika Jindal <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 10 +++++++++- drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++++- 2 files changed, 17 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +0
-0@@ -3225,7 +3225,15 @@ void intel_ddi_init(struct drm_device *dev, enum port port) goto err;drivers/gpu/drm/i915/intel_ddi.c void intel_ddi_init(struct drm_device *dev, enum port port) · line 3234
Quoted 10 lines
drivers/gpu/drm/i915/intel_ddi.c +7
-1intel_dig_port->hpd_pulse = intel_dp_hpd_pulse; - dev_priv->hotplug.irq_port[port] = intel_dig_port; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 ) + && port ==PORT_B ) + dev_priv->hotplug.irq_port[PORT_A ] = intel_dig_port;This happens to work but is confusing. irq_port[PORT_A] will be set here already and the above will simply overwrite it without explanation. I would also handle the port ==
PORT_Acase and not setirq_portfor it.The same swapping for
hpd_pinis missing fromintel_dp_init_connector().Quoted 23 lines
drivers/gpu/drm/i915/intel_ddi.c +2
-0+else + dev_priv->hotplug.irq_port[port] = intel_dig_port; }/* In theory we don't need the encoder->type check, but leave it just in drivers/gpu/drm/i915/intel_hdmi.c +8
-1@@ -1973,7 +1973,14 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, intel_hdmi->ddc_bus =GMBUS_PIN_1_BXT ; else intel_hdmi->ddc_bus = GMBUS_PIN_DPB; - intel_encoder->hpd_pin =HPD_PORT_B ; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ; +else + intel_encoder->hpd_pin =HPD_PORT_B ;break ;
Quoted 8 lines
drivers/gpu/drm/i915/intel_hdmi.c void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, · line 1986
Quoted 2 lines
drivers/gpu/drm/i915/intel_hdmi.c +0
-0case PORT_C :if (IS_BROXTON (dev_priv))As I earlier pointed out with the above approach, you need to add support for HPD events on the
HPD_PORT_Apin. If you look at thefor_each_hpd_pin()macro and intel_hpd_irq_handler()/is_dig_port you'll notice that any interrupt event on theHPD_PORT_Apin will be ignored now.
Hmm :(. For now, we can fix for_each_hpd_pin and add a check in intel_hpd_pin_to_port to return PORT_B for pin 0 if A0/A1. Then we can skip the check in intel_ddi_init. But this again will look very confusing.
So two options:
1. We move back to the older approach where we just use another hpd ports array in i915_irq.c
2. Go with current approach.
I feel option 1 is more clean and less prone to further issues. What do you suggest?
Regards,
Sonika
Quoted 3 lines
--Imre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 75 lines · Sonika
Quoted 61 lines · Imre Deak
Quoted 20 lines · Sonika Jindal
As per bspec, on BXT A0/A1, sw needs to activate DDIA HPD logic and interrupts to check the external panel connection and DDIC HPD logic for edp panel.
v2: For DP,
irq_portis used to determine the encoder instead ofhpd_pinand removing the edp HPD logic because port A HPD is not present(Imre)Signed-off-by Sonika Jindal <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 10 +++++++++- drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++++- 2 files changed, 17 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +0
-0@@ -3225,7 +3225,15 @@ void intel_ddi_init(struct drm_device *dev, enum port port) goto err;drivers/gpu/drm/i915/intel_ddi.c void intel_ddi_init(struct drm_device *dev, enum port port) · line 3234
Quoted 10 lines
drivers/gpu/drm/i915/intel_ddi.c +7
-1intel_dig_port->hpd_pulse = intel_dp_hpd_pulse; - dev_priv->hotplug.irq_port[port] = intel_dig_port; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 ) + && port ==PORT_B ) + dev_priv->hotplug.irq_port[PORT_A ] = intel_dig_port;This happens to work but is confusing. irq_port[PORT_A] will be set here already and the above will simply overwrite it without explanation. I would also handle the port ==
PORT_Acase and not setirq_portfor it.The same swapping for
hpd_pinis missing fromintel_dp_init_connector().Quoted 23 lines
drivers/gpu/drm/i915/intel_ddi.c +2
-0+else + dev_priv->hotplug.irq_port[port] = intel_dig_port; }/* In theory we don't need the encoder->type check, but leave it just in drivers/gpu/drm/i915/intel_hdmi.c +8
-1@@ -1973,7 +1973,14 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, intel_hdmi->ddc_bus =GMBUS_PIN_1_BXT ; else intel_hdmi->ddc_bus = GMBUS_PIN_DPB; - intel_encoder->hpd_pin =HPD_PORT_B ; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ; +else + intel_encoder->hpd_pin =HPD_PORT_B ;break ;Quoted 8 lines
drivers/gpu/drm/i915/intel_hdmi.c void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, · line 1986
Quoted 2 lines
drivers/gpu/drm/i915/intel_hdmi.c +0
-0case PORT_C :if (IS_BROXTON (dev_priv))As I earlier pointed out with the above approach, you need to add support for HPD events on the
HPD_PORT_Apin. If you look at thefor_each_hpd_pin()macro and intel_hpd_irq_handler()/is_dig_port you'll notice that any interrupt event on theHPD_PORT_Apin will be ignored now.Hmm :(. For now, we can fix
for_each_hpd_pinand add a check inintel_hpd_pin_to_portto returnPORT_Bfor pin 0 if A0/A1. Then we can skip the check inintel_ddi_init. But this again will look very confusing.
Quoted 7 lines
So two options:
1. We move back to the older approach where we just use another hpd ports array ini915_irq.c
2. Go with current approach.I feel option 1 is more clean and less prone to further issues. What do you suggest?
I also think that adding support for HPD on the port A pin is the better way and this would be needed in any case for eDP short pulse detection support in the future regardless of this workaround. I'll send a patchset that does this, I think on top of that we could apply the current version of your 2 workaround patches (with the comments addressed).
--Imre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 drm/i915/bxt: WA for swapped HPD pins in A stepping
As per bspec, on BXT A0/A1, sw needs to activate DDIA HPD logic and interrupts to check the external panel connection and DDIC HPD logic for edp panel.
v2: For DP, irq_port is used to determine the encoder instead of hpd_pin and removing the edp HPD logic because port A HPD is not present(Imre)
v3: Rebased on top of Imre's patchset for enabling HPD on PORT A. Added hpd_pin swapping for intel_dp_init_connector, setting encoder for PORT_A as per the WA in irq_port (Imre)
--- drivers/gpu/drm/i915/intel_ddi.c | 12 +++++++++++- drivers/gpu/drm/i915/intel_dp.c | 4 ++++ drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++++- 3 files changed, 23 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +11 -1
@@ -3225,7 +3225,17 @@ void intel_ddi_init(struct drm_device *dev, enum port port) goto err; intel_dig_port->hpd_pulse = intel_dp_hpd_pulse; - dev_priv->hotplug.irq_port[port] = intel_dig_port; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) { +if (port ==PORT_B ) + dev_priv->hotplug.irq_port[PORT_A ] = intel_dig_port; +else if (port ==PORT_A ) + dev_priv->hotplug.irq_port[PORT_C ] = intel_dig_port; + }else + dev_priv->hotplug.irq_port[port] = intel_dig_port; }/* In theory we don't need the encoder->type check, but leave it just in
drivers/gpu/drm/i915/intel_dp.c +4 -0
@@ -5785,9 +5785,13 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,switch (port) {case PORT_A : intel_encoder->hpd_pin =HPD_PORT_A ; +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_C ;break ;case PORT_B : intel_encoder->hpd_pin =HPD_PORT_B ; +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ;break ;case PORT_C : intel_encoder->hpd_pin =HPD_PORT_C ;
drivers/gpu/drm/i915/intel_hdmi.c +8 -1
@@ -1973,7 +1973,14 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, intel_hdmi->ddc_bus =GMBUS_PIN_1_BXT ; else intel_hdmi->ddc_bus = GMBUS_PIN_DPB; - intel_encoder->hpd_pin =HPD_PORT_B ; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ; +else + intel_encoder->hpd_pin =HPD_PORT_B ;break ;case PORT_C :if (IS_BROXTON (dev_priv))
Signature · 6 lines
1.7.10.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 69 lines · Sonika Jindal
As per bspec, on BXT A0/A1, sw needs to activate DDIA HPD logic and interrupts to check the external panel connection and DDIC HPD logic for edp panel.
v2: For DP,
irq_portis used to determine the encoder instead ofhpd_pinand removing the edp HPD logic because port A HPD is not present(Imre)
v3: Rebased on top of Imre's patchset for enabling HPD on PORT A. Addedhpd_pinswapping forintel_dp_init_connector, setting encoder forPORT_Aas per the WA inirq_port(Imre)Signed-off-by Sonika Jindal <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 12 +++++++++++- drivers/gpu/drm/i915/intel_dp.c | 4 ++++ drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++++- 3 files changed, 23 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +11
-1@@ -3225,7 +3225,17 @@ void intel_ddi_init(struct drm_device *dev, enum port port) goto err; intel_dig_port->hpd_pulse = intel_dp_hpd_pulse; - dev_priv->hotplug.irq_port[port] = intel_dig_port; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) { +if (port ==PORT_B ) + dev_priv->hotplug.irq_port[PORT_A ] = intel_dig_port; +else if (port ==PORT_A ) + dev_priv->hotplug.irq_port[PORT_C ] = intel_dig_port; + }else + dev_priv->hotplug.irq_port[port] = intel_dig_port; }/* In theory we don't need the encoder->type check, but leave it just in drivers/gpu/drm/i915/intel_dp.c +4
-0@@ -5785,9 +5785,13 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,switch (port) {case PORT_A : intel_encoder->hpd_pin =HPD_PORT_A ; +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_C ;break ;case PORT_B : intel_encoder->hpd_pin =HPD_PORT_B ; +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ;break ;case PORT_C : intel_encoder->hpd_pin =HPD_PORT_C ;drivers/gpu/drm/i915/intel_hdmi.c +1
-1@@ -1973,7 +1973,14 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, intel_hdmi->ddc_bus =GMBUS_PIN_1_BXT ; else intel_hdmi->ddc_bus = GMBUS_PIN_DPB; - intel_encoder->hpd_pin =HPD_PORT_B ; +/*
drivers/gpu/drm/i915/intel_hdmi.c void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, · line 1986
Quoted 10 lines
drivers/gpu/drm/i915/intel_hdmi.c +7
-0+* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ; +else + intel_encoder->hpd_pin =HPD_PORT_B ;break ;case PORT_C :if (IS_BROXTON (dev_priv))
bxt_hpd_irq_setup is not touched here without this being updated i dont think HPD can be enabled.
Signature · 7 lines
regards, Sivakumar _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 81 lines · Sivakumar Thulasimani
Quoted 78 lines · Sonika Jindal
As per bspec, on BXT A0/A1, sw needs to activate DDIA HPD logic and interrupts to check the external panel connection and DDIC HPD logic for edp panel.
v2: For DP,
irq_portis used to determine the encoder instead ofhpd_pinand removing the edp HPD logic because port A HPD is not present(Imre)
v3: Rebased on top of Imre's patchset for enabling HPD on PORT A. Addedhpd_pinswapping forintel_dp_init_connector, setting encoder forPORT_Aas per the WA inirq_port(Imre)Signed-off-by Sonika Jindal <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 12 +++++++++++- drivers/gpu/drm/i915/intel_dp.c | 4 ++++ drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++++- 3 files changed, 23 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +11
-1@@ -3225,7 +3225,17 @@ void intel_ddi_init(struct drm_device *dev, enum port port) goto err; intel_dig_port->hpd_pulse = intel_dp_hpd_pulse; - dev_priv->hotplug.irq_port[port] = intel_dig_port; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) { +if (port ==PORT_B ) + dev_priv->hotplug.irq_port[PORT_A ] = intel_dig_port; +else if (port ==PORT_A ) + dev_priv->hotplug.irq_port[PORT_C ] = intel_dig_port; + }else + dev_priv->hotplug.irq_port[port] = intel_dig_port; }/* In theory we don't need the encoder->type check, but leave it just in
drivers/gpu/drm/i915/intel_dp.c +4
-0@@ -5785,9 +5785,13 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port, switch (port) {case PORT_A : intel_encoder->hpd_pin =HPD_PORT_A ; +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_C ;break ;case PORT_B : intel_encoder->hpd_pin =HPD_PORT_B ; +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ;break ;case PORT_C :intel_encoder->hpd_pin = HPD_PORT_C;drivers/gpu/drm/i915/intel_hdmi.c +5
-1@@ -1973,7 +1973,14 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, intel_hdmi->ddc_bus =GMBUS_PIN_1_BXT ; else intel_hdmi->ddc_bus = GMBUS_PIN_DPB; - intel_encoder->hpd_pin =HPD_PORT_B ; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 ))
Quoted 8 lines
Quoted 6 lines
drivers/gpu/drm/i915/intel_hdmi.c +3
-0+ intel_encoder->hpd_pin =HPD_PORT_A ; + else + intel_encoder->hpd_pin = HPD_PORT_B;break ;case PORT_C :if (
IS_BROXTON(dev_priv))
bxt_hpd_irq_setupis not touched here without this being updated i dont think HPD can be enabled.
Now, we swap the hpd_pin, which is being used to enable HPD in bxt_hpd_irq_setup.
Regards,
Sonika
Quoted 1 line
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 93 lines · Sonika
Quoted 82 lines · Sivakumar Thulasimani
Quoted 79 lines · Sonika Jindal
As per bspec, on BXT A0/A1, sw needs to activate DDIA HPD logic and interrupts to check the external panel connection and DDIC HPD logic for edp panel.
v2: For DP,
irq_portis used to determine the encoder instead ofhpd_pinand removing the edp HPD logic because port A HPD is not present(Imre)
v3: Rebased on top of Imre's patchset for enabling HPD on PORT A. Addedhpd_pinswapping forintel_dp_init_connector, setting encoder forPORT_Aas per the WA inirq_port(Imre)Signed-off-by Sonika Jindal <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 12 +++++++++++- drivers/gpu/drm/i915/intel_dp.c | 4 ++++ drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++++- 3 files changed, 23 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +11
-1@@ -3225,7 +3225,17 @@ void intel_ddi_init(struct drm_device *dev, enum port port) goto err; intel_dig_port->hpd_pulse = intel_dp_hpd_pulse; - dev_priv->hotplug.irq_port[port] = intel_dig_port; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) { +if (port ==PORT_B ) + dev_priv->hotplug.irq_port[PORT_A ] = intel_dig_port; +else if (port ==PORT_A ) + dev_priv->hotplug.irq_port[PORT_C ] = intel_dig_port; + }else + dev_priv->hotplug.irq_port[port] = intel_dig_port; }/* In theory we don't need the encoder->type check, but leave it just in
drivers/gpu/drm/i915/intel_dp.c +4
-0@@ -5785,9 +5785,13 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port, switch (port) {case PORT_A : intel_encoder->hpd_pin =HPD_PORT_A ; +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_C ;break ;case PORT_B : intel_encoder->hpd_pin =HPD_PORT_B ; +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ;break ;case PORT_C :intel_encoder->hpd_pin = HPD_PORT_C;drivers/gpu/drm/i915/intel_hdmi.c +5
-1@@ -1973,7 +1973,14 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, intel_hdmi->ddc_bus =GMBUS_PIN_1_BXT ; else intel_hdmi->ddc_bus = GMBUS_PIN_DPB; - intel_encoder->hpd_pin =HPD_PORT_B ; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 ))Quoted 8 lines
Quoted 6 lines
drivers/gpu/drm/i915/intel_hdmi.c +3
-0+ intel_encoder->hpd_pin =HPD_PORT_A ; + else + intel_encoder->hpd_pin = HPD_PORT_B;break ;case PORT_C :if (
IS_BROXTON(dev_priv))
bxt_hpd_irq_setupis not touched here without this being updated i dont think HPD can be enabled.
Quoted 2 lines
Now, we swap the
hpd_pin, which is being used to enable HPD inbxt_hpd_irq_setup.
yes, but the hpd_pin which is updated to HPD_PORT_A when enters bxt_hpd_setup_irq we are enabling only HPD B & C. so it will not enable HPDA. unless i am missing some patch i am not seeing code to enable HPD A with latest nightly code.
Quoted 3 lines
Regards,
SonikaQuoted 1 line
Signature · 7 lines
regards, Sivakumar _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 96 lines · Sivakumar Thulasimani
Quoted 93 lines · Sonika
Quoted 90 lines · Sivakumar Thulasimani
Quoted 84 lines · Sonika Jindal
As per bspec, on BXT A0/A1, sw needs to activate DDIA HPD logic and interrupts to check the external panel connection and DDIC HPD logic for edp panel.
v2: For DP,
irq_portis used to determine the encoder instead ofhpd_pinand removing the edp HPD logic because port A HPD is not present(Imre)
v3: Rebased on top of Imre's patchset for enabling HPD on PORT A. Addedhpd_pinswapping forintel_dp_init_connector, setting encoder forPORT_Aas per the WA inirq_port(Imre)Signed-off-by Sonika Jindal <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 12 +++++++++++- drivers/gpu/drm/i915/intel_dp.c | 4 ++++ drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++++- 3 files changed, 23 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +11
-1@@ -3225,7 +3225,17 @@ void intel_ddi_init(struct drm_device *dev, enum port port) goto err; intel_dig_port->hpd_pulse = intel_dp_hpd_pulse; - dev_priv->hotplug.irq_port[port] = intel_dig_port; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) { +if (port ==PORT_B ) + dev_priv->hotplug.irq_port[PORT_A ] = intel_dig_port; +else if (port ==PORT_A ) + dev_priv->hotplug.irq_port[PORT_C ] = intel_dig_port; + }else + dev_priv->hotplug.irq_port[port] = intel_dig_port; }/* In theory we don't need the encoder->type check, but leave it just in
drivers/gpu/drm/i915/intel_dp.c +4
-0@@ -5785,9 +5785,13 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port, switch (port) {case PORT_A : intel_encoder->hpd_pin =HPD_PORT_A ; +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_C ;break ;case PORT_B : intel_encoder->hpd_pin =HPD_PORT_B ; +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ;break ;case PORT_C :intel_encoder->hpd_pin = HPD_PORT_C;drivers/gpu/drm/i915/intel_hdmi.c +8
-1@@ -1973,7 +1973,14 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, intel_hdmi->ddc_bus =GMBUS_PIN_1_BXT ; else intel_hdmi->ddc_bus = GMBUS_PIN_DPB; - intel_encoder->hpd_pin =HPD_PORT_B ; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ; +else + intel_encoder->hpd_pin =HPD_PORT_B ;break ;case PORT_C :Quoted 1 line
if (
IS_BROXTON(dev_priv))
bxt_hpd_irq_setupis not touched here without this being updated i dont think HPD can be enabled.
Quoted 9 lines
Quoted 3 lines
Now, we swap the
hpd_pin, which is being used to enable HPD inbxt_hpd_irq_setup.yes, but the
hpd_pinwhich is updated toHPD_PORT_Awhen entersbxt_hpd_setup_irqwe are enabling
only HPD B & C. so it will not enable HPDA. unless i am missing some patch i am not seeing code to
enable HPD A with latest nightly code.
Yes, you are missing the patch 1 of this series :) [PATCH 1/2] drm/i915/bxt: Add HPD support for DDIA
Quoted 4 lines
Quoted 3 lines
Regards,
SonikaQuoted 1 line
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 42 lines · Sonika
Quoted 39 lines · Sivakumar Thulasimani
Quoted 36 lines · Sonika
Quoted 33 lines · Sivakumar Thulasimani
Quoted 30 lines · Sonika Jindal
As per bspec, on BXT A0/A1, sw needs to activate DDIA HPD logic and interrupts to check the external panel connection and DDIC HPD logic for edp panel.
v2: For DP,
irq_portis used to determine the encoder instead ofhpd_pinand removing the edp HPD logic because port A HPD is not present(Imre)
v3: Rebased on top of Imre's patchset for enabling HPD on PORT A. Addedhpd_pinswapping forintel_dp_init_connector, setting encoder forPORT_Aas per the WA inirq_port(Imre)Signed-off-by Sonika Jindal <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 12 +++++++++++- drivers/gpu/drm/i915/intel_dp.c | 4 ++++ drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++++- 3 files changed, 23 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +2
-1@@ -3225,7 +3225,17 @@ void intel_ddi_init(struct drm_device *dev, enum port port) goto err; intel_dig_port->hpd_pulse = intel_dp_hpd_pulse; - dev_priv->hotplug.irq_port[port] = intel_dig_port; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/intel_ddi.c void intel_ddi_init(struct drm_device *dev, enum port port) · line 3236
Quoted 8 lines
drivers/gpu/drm/i915/intel_ddi.c +7
-0+* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) { +if (port ==PORT_B ) + dev_priv->hotplug.irq_port[PORT_A ] = intel_dig_port; +else if (port ==PORT_A ) + dev_priv->hotplug.irq_port[PORT_C ] = intel_dig_port;
Please don't enable interrupt for PORT_A :) otherwise we might have to handle HPD for each pps on/off like in CHV.
Quoted 56 lines
Quoted 56 lines
Quoted 56 lines
Quoted 45 lines
Quoted 45 lines
drivers/gpu/drm/i915/intel_ddi.c +2
-0+ }else + dev_priv->hotplug.irq_port[port] = intel_dig_port; }/* In theory we don't need the encoder->type check, but leave it
just indrivers/gpu/drm/i915/intel_dp.c +4
-0@@ -5785,9 +5785,13 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port, switch (port) {case PORT_A : intel_encoder->hpd_pin =HPD_PORT_A ; +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_C ;break ;case PORT_B : intel_encoder->hpd_pin =HPD_PORT_B ; +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ;break; case PORT_C: intel_encoder->hpd_pin = HPD_PORT_C;drivers/gpu/drm/i915/intel_hdmi.c +5
-1@@ -1973,7 +1973,14 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, intel_hdmi->ddc_bus =GMBUS_PIN_1_BXT ; else intel_hdmi->ddc_bus = GMBUS_PIN_DPB; - intel_encoder->hpd_pin =HPD_PORT_B ; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 ))Quoted 8 lines
Quoted 6 lines
drivers/gpu/drm/i915/intel_hdmi.c +3
-0+ intel_encoder->hpd_pin =HPD_PORT_A ; + else + intel_encoder->hpd_pin = HPD_PORT_B;break ;case
PORT_C:
if (IS_BROXTON(dev_priv))
bxt_hpd_irq_setupis not touched here without this being updated i dont think HPD can be enabled.Now, we swap the
hpd_pin, which is being used to enable HPD inbxt_hpd_irq_setup.
Quoted 13 lines
Quoted 6 lines
yes, but the
hpd_pinwhich is updated toHPD_PORT_Awhen entersbxt_hpd_setup_irqwe are enabling
only HPD B & C. so it will not enable HPDA. unless i am missing some patch i am not seeing code to
enable HPD A with latest nightly code.Yes, you are missing the patch 1 of this series :) [PATCH 1/2] drm/i915/bxt: Add HPD support for DDIA
Quoted 4 lines
Quoted 3 lines
Regards,
SonikaQuoted 1 line
ok missed that in the thread list :).
Signature · 7 lines
regards, Sivakumar _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 drm/i915/bxt: WA for swapped HPD pins in A stepping
In reply to Sonika JindalWA for BXT A0/A1, where DDIB's HPD pin is swapped to DDIA, so enabling DDIA HPD pin in place of DDIB.
v2: For DP, irq_port is used to determine the encoder instead of hpd_pin and removing the edp HPD logic because port A HPD is not present(Imre)
v3: Rebased on top of Imre's patchset for enabling HPD on PORT A. Added hpd_pin swapping for intel_dp_init_connector, setting encoder for PORT_A as per the WA in irq_port (Imre)
v4: Dont enable interrupt for edp, also reframe the description (Siva)
--- drivers/gpu/drm/i915/intel_ddi.c | 11 ++++++++++- drivers/gpu/drm/i915/intel_dp.c | 4 ++++ drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++++- 3 files changed, 22 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +10 -1
@@ -3225,7 +3225,16 @@ void intel_ddi_init(struct drm_device *dev, enum port port) goto err; intel_dig_port->hpd_pulse = intel_dp_hpd_pulse; - dev_priv->hotplug.irq_port[port] = intel_dig_port; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 ) + && port ==PORT_B ) + dev_priv->hotplug.irq_port[PORT_A ] = intel_dig_port; +/* Dont enable interrupts for edp*/ +else if (port !=PORT_A ) + dev_priv->hotplug.irq_port[port] = intel_dig_port; }/* In theory we don't need the encoder->type check, but leave it just in
drivers/gpu/drm/i915/intel_dp.c +4 -0
@@ -5785,9 +5785,13 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,switch (port) {case PORT_A : intel_encoder->hpd_pin =HPD_PORT_A ; +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_C ;break ;case PORT_B : intel_encoder->hpd_pin =HPD_PORT_B ; +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ;break ;case PORT_C : intel_encoder->hpd_pin =HPD_PORT_C ;
drivers/gpu/drm/i915/intel_hdmi.c +8 -1
@@ -1973,7 +1973,14 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, intel_hdmi->ddc_bus =GMBUS_PIN_1_BXT ; else intel_hdmi->ddc_bus = GMBUS_PIN_DPB; - intel_encoder->hpd_pin =HPD_PORT_B ; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ; +else + intel_encoder->hpd_pin =HPD_PORT_B ;break ;case PORT_C :if (IS_BROXTON (dev_priv))
Signature · 6 lines
1.7.10.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 78 lines · Sonika Jindal
WA for BXT A0/A1, where DDIB's HPD pin is swapped to DDIA, so enabling DDIA HPD pin in place of DDIB.
v2: For DP,
irq_portis used to determine the encoder instead ofhpd_pinand removing the edp HPD logic because port A HPD is not present(Imre)
v3: Rebased on top of Imre's patchset for enabling HPD on PORT A. Addedhpd_pinswapping forintel_dp_init_connector, setting encoder forPORT_Aas per the WA inirq_port(Imre)
v4: Dont enable interrupt for edp, also reframe the description (Siva)Signed-off-by Sonika Jindal <[email protected]>--- drivers/gpu/drm/i915/intel_ddi.c | 11 ++++++++++- drivers/gpu/drm/i915/intel_dp.c | 4 ++++ drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++++- 3 files changed, 22 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +10
-1@@ -3225,7 +3225,16 @@ void intel_ddi_init(struct drm_device *dev, enum port port) goto err; intel_dig_port->hpd_pulse = intel_dp_hpd_pulse; - dev_priv->hotplug.irq_port[port] = intel_dig_port; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 ) + && port ==PORT_B ) + dev_priv->hotplug.irq_port[PORT_A ] = intel_dig_port; +/* Dont enable interrupts for edp*/ +else if (port !=PORT_A ) + dev_priv->hotplug.irq_port[port] = intel_dig_port; }/* In theory we don't need the encoder->type check, but leave it just in drivers/gpu/drm/i915/intel_dp.c +4
-0@@ -5785,9 +5785,13 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,switch (port) {case PORT_A : intel_encoder->hpd_pin =HPD_PORT_A ; +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_C ;break ;case PORT_B : intel_encoder->hpd_pin =HPD_PORT_B ; +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ;break ;case PORT_C : intel_encoder->hpd_pin =HPD_PORT_C ;drivers/gpu/drm/i915/intel_hdmi.c +8
-1@@ -1973,7 +1973,14 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, intel_hdmi->ddc_bus =GMBUS_PIN_1_BXT ; else intel_hdmi->ddc_bus = GMBUS_PIN_DPB; - intel_encoder->hpd_pin =HPD_PORT_B ; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ; +else + intel_encoder->hpd_pin =HPD_PORT_B ;break ;case PORT_C :if (IS_BROXTON (dev_priv))
Signature · 2 lines
regards, Sivakumar
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Task id: 6870 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
ILK -1 296/296 295/296 SNB -1 316/316 315/316 IVB -1 343/343 342/343 BYT -3 286/286 283/286 HSW -1 379/379 378/379 -------------------------------------Detailed------------------------------------- Platform Test drm-intel-nightly Series Applied *ILK igt@gem_reg_read PASS(1) NRUN(1) *SNB igt@gem_reg_read PASS(1) INIT(1) *IVB igt@gem_reg_read PASS(1) NRUN(1) *BYT igt@drm_read@short-buffer-block PASS(1) FAIL(1) *BYT igt@gem_partial_pwrite_pread@reads-uncached PASS(1) FAIL(1) *BYT igt@gem_reg_read PASS(1) INIT(1) *HSW igt@gem_reg_read PASS(1) INIT(1)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 11 lines · Sonika Jindal
WA for BXT A0/A1, where DDIB's HPD pin is swapped to DDIA, so enabling DDIA HPD pin in place of DDIB.
v2: For DP,
irq_portis used to determine the encoder instead ofhpd_pinand removing the edp HPD logic because port A HPD is not present(Imre)
v3: Rebased on top of Imre's patchset for enabling HPD on PORT A. Addedhpd_pinswapping forintel_dp_init_connector, setting encoder forPORT_Aas per the WA inirq_port(Imre)
v4: Dont enable interrupt for edp, also reframe the description (Siva)
Quoted 1 line
Signed-off-by Sonika Jindal <[email protected]>
This patch is a new version of 2/2 of your patchset at
http://lists.freedesktop.org/archives/intel-gfx/2015-July/071580.html
so this should've been sent either as a reply to the individual v1 patch there, or just by resending the whole patchset. For now you could just resend the whole patchset. Also please add the version info to the subject with git format-patch --subject-prefix.
Quoted 15 lines
--- drivers/gpu/drm/i915/intel_ddi.c | 11 ++++++++++- drivers/gpu/drm/i915/intel_dp.c | 4 ++++ drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++++- 3 files changed, 22 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +0
-1@@ -3225,7 +3225,16 @@ void intel_ddi_init(struct drm_device *dev, enum port port) goto err; intel_dig_port->hpd_pulse = intel_dp_hpd_pulse; - dev_priv->hotplug.irq_port[port] = intel_dig_port;
drivers/gpu/drm/i915/intel_ddi.c void intel_ddi_init(struct drm_device *dev, enum port port) · line 3237
Quoted 10 lines
drivers/gpu/drm/i915/intel_ddi.c +10
-0+/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 ) + && port ==PORT_B ) + dev_priv->hotplug.irq_port[PORT_A ] = intel_dig_port; +/* Dont enable interrupts for edp*/ +else if (port !=PORT_A ) + dev_priv->hotplug.irq_port[port] = intel_dig_port;
Not enabling HPD on eDP is not a BXT specific change (even though it's disabled now everywhere), so that part should be a separate patch and ordered before patch 1/2. Also this isn't the proper place to disable HPD handling; as long as the corresponding intel_encoder->hpd_pin is set the relevant interrupt will get unmasked and hotplug_work will be called. See bxt_hpd_irq_setup() and intel_hpd_irq_handler().
Quoted 31 lines
drivers/gpu/drm/i915/intel_ddi.c +0
-0}/* In theory we don't need the encoder->type check, but leave it just in drivers/gpu/drm/i915/intel_dp.c +4
-0@@ -5785,9 +5785,13 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,switch (port) {case PORT_A : intel_encoder->hpd_pin =HPD_PORT_A ; +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_C ;break ;case PORT_B : intel_encoder->hpd_pin =HPD_PORT_B ; +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ;break ;case PORT_C : intel_encoder->hpd_pin =HPD_PORT_C ;drivers/gpu/drm/i915/intel_hdmi.c +1
-1@@ -1973,7 +1973,14 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, intel_hdmi->ddc_bus =GMBUS_PIN_1_BXT ; else intel_hdmi->ddc_bus = GMBUS_PIN_DPB; - intel_encoder->hpd_pin =HPD_PORT_B ; +/*
drivers/gpu/drm/i915/intel_hdmi.c void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, · line 1986
Quoted 10 lines
drivers/gpu/drm/i915/intel_hdmi.c +7
-0+* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ; +else + intel_encoder->hpd_pin =HPD_PORT_B ;break ;case PORT_C :if (IS_BROXTON (dev_priv))
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 45 lines · Imre Deak
Quoted 11 lines · Sonika Jindal
WA for BXT A0/A1, where DDIB's HPD pin is swapped to DDIA, so enabling DDIA HPD pin in place of DDIB.
v2: For DP,
irq_portis used to determine the encoder instead ofhpd_pinand removing the edp HPD logic because port A HPD is not present(Imre)
v3: Rebased on top of Imre's patchset for enabling HPD on PORT A. Addedhpd_pinswapping forintel_dp_init_connector, setting encoder forPORT_Aas per the WA inirq_port(Imre)
v4: Dont enable interrupt for edp, also reframe the description (Siva)Quoted 1 line
Signed-off-by Sonika Jindal <[email protected]>This patch is a new version of 2/2 of your patchset at
http://lists.freedesktop.org/archives/intel-gfx/2015-July/071580.htmlso this should've been sent either as a reply to the individual v1 patch there, or just by resending the whole patchset. For now you could just resend the whole patchset. Also please add the version info to the subject with git format-patch --subject-prefix.
Quoted 23 lines
--- drivers/gpu/drm/i915/intel_ddi.c | 11 ++++++++++- drivers/gpu/drm/i915/intel_dp.c | 4 ++++ drivers/gpu/drm/i915/intel_hdmi.c | 9 ++++++++- 3 files changed, 22 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/intel_ddi.c +8
-1@@ -3225,7 +3225,16 @@ void intel_ddi_init(struct drm_device *dev, enum port port) goto err; intel_dig_port->hpd_pulse = intel_dp_hpd_pulse; - dev_priv->hotplug.irq_port[port] = intel_dig_port; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 ) + && port ==PORT_B ) + dev_priv->hotplug.irq_port[PORT_A ] = intel_dig_port; +/* Dont enable interrupts for edp*/
Quoted 9 lines
drivers/gpu/drm/i915/intel_ddi.c void intel_ddi_init(struct drm_device *dev, enum port port) · line 3237
Quoted 2 lines
drivers/gpu/drm/i915/intel_ddi.c +2
-0+else if (port !=PORT_A ) + dev_priv->hotplug.irq_port[port] = intel_dig_port;Not enabling HPD on eDP is not a BXT specific change (even though it's disabled now everywhere), so that part should be a separate patch and ordered before patch 1/2. Also this isn't the proper place to disable HPD handling; as long as the corresponding
intel_encoder->hpd_pinis set the relevant interrupt will get unmasked andhotplug_workwill be called. Seebxt_hpd_irq_setup()andintel_hpd_irq_handler().
hmm , ok Sonika, please remove HPD_PORT_A being set for PORT_A. here else if can be modified to simple else
Quoted 44 lines
Quoted 41 lines
drivers/gpu/drm/i915/intel_ddi.c +0
-0}/* In theory we don't need the encoder->type check, but leave it just in drivers/gpu/drm/i915/intel_dp.c +4
-0@@ -5785,9 +5785,13 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,switch (port) {case PORT_A : intel_encoder->hpd_pin =HPD_PORT_A ; +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_C ;break ;case PORT_B : intel_encoder->hpd_pin =HPD_PORT_B ; +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ;break ;case PORT_C : intel_encoder->hpd_pin =HPD_PORT_C ;drivers/gpu/drm/i915/intel_hdmi.c +8
-1@@ -1973,7 +1973,14 @@ void intel_hdmi_init_connector(struct intel_digital_port *intel_dig_port, intel_hdmi->ddc_bus =GMBUS_PIN_1_BXT ; else intel_hdmi->ddc_bus = GMBUS_PIN_DPB; - intel_encoder->hpd_pin =HPD_PORT_B ; +/* +* On BXT A0/A1, sw needs to activate DDIA HPD logic and +* interrupts to check the external panel connection. +*/ +if (IS_BROXTON (dev_priv) && (INTEL_REVID (dev) <BXT_REVID_B0 )) + intel_encoder->hpd_pin =HPD_PORT_A ; +else + intel_encoder->hpd_pin =HPD_PORT_B ;break ;case PORT_C :if (IS_BROXTON (dev_priv))
Signature · 8 lines
regards, Sivakumar _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Task id: 6822 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
ILK 302/302 302/302 SNB 315/315 315/315 IVB 342/342 342/342
BYT -2 285/285 283/285
HSW 378/378 378/378
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
*BYT igt@gem_partial_pwrite_pread@reads-display PASS(1) FAIL(1)
*BYT igt@gem_partial_pwrite_pread@reads-uncached PASS(1) FAIL(1)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Task id: 6777 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
ILK 303/303 303/303
SNB +3 309/316 312/316
IVB 343/343 343/343
BYT -1 285/285 284/285
HSW +13 367/381 380/381
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
*SNB igt@kms_mmio_vs_cs_flip@setcrtc_vs_cs_flip DMESG_WARN(1) PASS(1) *SNB igt@kms_mmio_vs_cs_flip@setplane_vs_cs_flip DMESG_WARN(1) PASS(1) *SNB igt@pm_rpm@cursor DMESG_WARN(1) PASS(1) *SNB igt@pm_rpm@cursor-dpms DMESG_FAIL(1) FAIL(1) *BYT igt@gem_tiled_partial_pwrite_pread@reads PASS(1) FAIL(1) *HSW igt@kms_mmio_vs_cs_flip@setplane_vs_cs_flip DMESG_WARN(1) PASS(1) *HSW igt@pm_lpsp@non-edp DMESG_WARN(1) PASS(1) *HSW igt@pm_rpm@debugfs-read DMESG_WARN(1) PASS(1) *HSW igt@pm_rpm@gem-idle DMESG_WARN(1) PASS(1) *HSW igt@pm_rpm@gem-mmap-gtt DMESG_WARN(1) PASS(1) *HSW igt@pm_rpm@gem-pread DMESG_WARN(1) PASS(1) *HSW igt@pm_rpm@i2c DMESG_WARN(1) PASS(1) *HSW igt@pm_rpm@modeset-non-lpsp DMESG_WARN(1) PASS(1) *HSW igt@pm_rpm@modeset-non-lpsp-stress-no-wait DMESG_WARN(1) PASS(1) *HSW igt@pm_rpm@pci-d3-state DMESG_WARN(1) PASS(1) *HSW igt@pm_rpm@reg-read-ioctl DMESG_WARN(1) PASS(1) *HSW igt@pm_rpm@rte DMESG_WARN(1) PASS(1) *HSW igt@pm_rpm@sysfs-read DMESG_WARN(1) PASS(1)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx