More Haswell VGA fixes
Subsystems (2)
cover More Haswell VGA fixes
From: Paulo Zanoni <[email protected]>
Hi
Here are more Haswell VGA fixes that I would like to see on Kernel 3.8. The first 2 patches are needed to make VGA work after suspend, the 3rd patch is needed to prevent black screen on some specific machines.
These patches are currently on top of drm-intel-fixes + the following 2 patches which are already on the mailing list:
- drm/i915: fix hsw_fdi_link_train "retry" code
- drm/i915: reject modes the LPT FDI receiver can't handle
I'd love to get these 5 patches on Kernel 3.8 since they're all important fixes that prevent black screens.
Thanks,
Paulo
Paulo Zanoni (3):
drm/i915: add support for mPHY destination on intel_sbi_{read,write} drm/i915: add lpt_init_pch_refclk
drm/i915: set the LPT FDI RX polarity reversal bit when needed
drivers/gpu/drm/i915/i915_drv.c | 3 +- drivers/gpu/drm/i915/i915_drv.h | 9 +- drivers/gpu/drm/i915/i915_reg.h | 11 +- drivers/gpu/drm/i915/intel_crt.c | 8 ++ drivers/gpu/drm/i915/intel_ddi.c | 2 + drivers/gpu/drm/i915/intel_display.c | 247 +++++++++++++++++++++++++++++------ 6 files changed, 236 insertions(+), 44 deletions(-)
Signature · 1 line
1.7.11.7
PATCH 1/3 drm/i915: add support for mPHY destination on intel_sbi_{read, write}
From: Paulo Zanoni <[email protected]>
This way we should be able to write mPHY registers using the Sideband Interface in the next commit. Also fixed some syntax oddities in the related code.
--- drivers/gpu/drm/i915/i915_drv.h | 5 +++ drivers/gpu/drm/i915/i915_reg.h | 4 +++ drivers/gpu/drm/i915/intel_display.c | 65 +++++++++++++++++------------------- 3 files changed, 40 insertions(+), 34 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +5 -0
@@ -382,6 +382,11 @@ enum intel_pch { PCH_LPT, /* Lynxpoint PCH */ }; +enum intel_sbi_destination { +SBI_ICLK , +SBI_MPHY , +}; +#define QUIRK_PIPEA_FORCE (1<<0)#define QUIRK_LVDS_SSC_DISABLE (1<<1)#define QUIRK_INVERT_BRIGHTNESS (1<<2)
drivers/gpu/drm/i915/i915_reg.h +4 -0
@@ -4534,6 +4534,10 @@#define SBI_ADDR 0xC6000#define SBI_DATA 0xC6004#define SBI_CTL_STAT 0xC6008 +#define SBI_CTL_DEST_ICLK (0x0<<16) +#define SBI_CTL_DEST_MPHY (0x1<<16) +#define SBI_CTL_OP_IORD (0x2<<8) +#define SBI_CTL_OP_IOWR (0x3<<8)#define SBI_CTL_OP_CRRD (0x6<<8)#define SBI_CTL_OP_CRWR (0x7<<8)#define SBI_RESPONSE_FAIL (0x1<<1)
drivers/gpu/drm/i915/intel_display.c +31 -34
119 lines not on this page · raw message
Signature · 1 line
1.7.11.7
Re: [PATCH 1/3] drm/i915: add support for mPHY destination on intel_sbi_{read, write}
Quoted 7 lines · Paulo Zanoni
From: Paulo Zanoni <[email protected]>
This way we should be able to write mPHY registers using the Sideband Interface in the next commit. Also fixed some syntax oddities in the related code.
Signed-off-by Paulo Zanoni <[email protected]>
(I'd have put the destination parameter first, talk about bike-shedding!)
Signature · 1 line
Damien
PATCH 2/3 drm/i915: add lpt_init_pch_refclk
In reply to Paulo ZanoniFrom: Paulo Zanoni <[email protected]>
We need this code to init the PCH SSC refclk and the FDI registers. The BIOS does this too and that's why VGA worked before this patch, until you tried to suspend the machine...
This patch implements the "Sequence to enable CLKOUT_DP for FDI usage and configure PCH FDI/IO" from our documentation.
--- drivers/gpu/drm/i915/i915_drv.c | 3 +- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_reg.h | 6 +- drivers/gpu/drm/i915/intel_display.c | 182 +++++++++++++++++++++++++++++++++-- 4 files changed, 183 insertions(+), 10 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +1 -2
@@ -554,8 +554,7 @@ static int __i915_drm_thaw(struct drm_device *dev)/* KMS EnterVT equivalent */ if (drm_core_check_feature (dev,DRIVER_MODESET )) { -if (HAS_PCH_IBX (dev) ||HAS_PCH_CPT (dev)) -ironlake_init_pch_refclk (dev); +intel_init_pch_refclk (dev);mutex_lock (&dev->struct_mutex); dev_priv->mm.suspended =0 ;
drivers/gpu/drm/i915/i915_drv.h +1 -1
@@ -1662,7 +1662,7 @@ extern void intel_modeset_setup_hw_state(struct drm_device *dev,extern bool intel_fbc_enabled (struct drm_device *dev);extern void intel_disable_fbc (struct drm_device *dev);extern bool ironlake_set_drps (struct drm_device *dev,u8 val); -extern void ironlake_init_pch_refclk (struct drm_device *dev); +extern void intel_init_pch_refclk (struct drm_device *dev);extern void gen6_set_rps (struct drm_device *dev,u8 val);extern void intel_detect_pch (struct drm_device *dev);extern int intel_trans_dp_port_sel (struct drm_crtc *crtc);
drivers/gpu/drm/i915/i915_reg.h +5 -1
@@ -3843,7 +3843,9 @@#define FDI_PHASE_SYNC_EN (pipe) (1<<(FDIA_PHASE_SYNC_SHIFT_EN - ((pipe) * 2)))#define FDI_BC_BIFURCATION_SELECT (1 << 12)#define SOUTH_CHICKEN2 0xc2004 -#define DPLS_EDP_PPS_FIX_DIS (1<<0) +#define FDI_MPHY_IOSFSB_RESET_STATUS (1<<13) +#define FDI_MPHY_IOSFSB_RESET_CTL (1<<12) +#define DPLS_EDP_PPS_FIX_DIS (1<<0)#define _FDI_RXA_CHICKEN 0xc200c#define _FDI_RXB_CHICKEN 0xc2010
@@ -4555,10 +4557,12 @@#define SBI_SSCDIVINTPHASE_PROPAGATE (1<<0)#define SBI_SSCCTL 0x020c#define SBI_SSCCTL6 0x060C +#define SBI_SSCCTL_PATHALT (1<<3)#define SBI_SSCCTL_DISABLE (1<<0)#define SBI_SSCAUXDIV6 0x0610#define SBI_SSCAUXDIV_FINALDIV2SEL (x) ((x)<<4)#define SBI_DBUFF0 0x2a00 +#define SBI_DBUFF0_ENABLE (1<<0)/* LPT PIXCLK_GATE */ #define PIXCLK_GATE 0xC6020
drivers/gpu/drm/i915/intel_display.c +176 -6
200 lines not on this page · raw message
Signature · 1 line
1.7.11.7
Re: [PATCH 2/3] drm/i915: add lpt_init_pch_refclk
drivers/gpu/drm/i915/intel_display.c void ironlake_init_pch_refclk(struct drm_device *dev) · line 5003
Quoted 13 lines · Paulo Zanoni
From: Paulo Zanoni <[email protected]>
We need this code to init the PCH SSC refclk and the FDI registers. The BIOS does this too and that's why VGA worked before this patch, until you tried to suspend the machine...
This patch implements the "Sequence to enable
CLKOUT_DPfor FDI usage and configure PCH FDI/IO" from our documentation.Signed-off-by Paulo Zanoni <[email protected]>drivers/gpu/drm/i915/intel_display.c +2
-0+if (IS_HASWELL (dev) && (dev->pci_device &0xFF00 ) ==0x0C00 ) + is_sdv = true;
Maybe have a IS_SDV() or IS_HSW_SDV() macro like we have a IS_ULT() one? The check should be on the PCH revision but hopefully there's a 1:1 correlation?
drivers/gpu/drm/i915/intel_display.c void ironlake_init_pch_refclk(struct drm_device *dev) · line 5023
Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +3
-0+if (wait_for_atomic_us (I915_READ (SOUTH_CHICKEN2 ) & +FDI_MPHY_IOSFSB_RESET_STATUS ,100 )) +DRM_ERROR ("FDI mPHY resert assert timeout\n" );
s/resert/reset/
drivers/gpu/drm/i915/intel_display.c void ironlake_init_pch_refclk(struct drm_device *dev) · line 5033
Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +10
-0+ + tmp =I915_READ (SOUTH_CHICKEN2 ); + tmp &= ~FDI_MPHY_IOSFSB_RESET_CTL ; +I915_WRITE (SOUTH_CHICKEN2 , tmp); + +if (wait_for_atomic_us ((I915_READ (SOUTH_CHICKEN2 ) & +FDI_MPHY_IOSFSB_RESET_STATUS ) ==0 , +100 )) +DRM_ERROR ("FDI mPHY reset de-assert timeout\n" ); + }
When either of those two waits error out, we carry on the sequence. We should probably fail and disable the VGA output (one of those error paths that never get to be tested, yey! I don't know how well we support connectors disappearing)?
drivers/gpu/drm/i915/intel_display.c void ironlake_init_pch_refclk(struct drm_device *dev) · line 5141
Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +3
-0+ tmp =intel_sbi_read (dev_priv,SBI_DBUFF0 ,SBI_ICLK ); + tmp |=SBI_DBUFF0_ENABLE ; +intel_sbi_write (dev_priv,SBI_DBUFF0 , tmp,SBI_ICLK );
Th ULT path is missing there.
I double checked the programming, looks good. I'll follow up with an amended patch for the 2 first bikesheds, leave the error path alone, and add the ULT path as a separate patch.
Signature · 1 line
Damien
Re: [PATCH 2/3] drm/i915: add lpt_init_pch_refclk
Hi
2012/12/8 Damien Lespiau <[email protected]>:
Quoted 10 lines · Paulo Zanoni
Quoted 9 lines
From: Paulo Zanoni <[email protected]>
We need this code to init the PCH SSC refclk and the FDI registers. The BIOS does this too and that's why VGA worked before this patch, until you tried to suspend the machine...
This patch implements the "Sequence to enable
CLKOUT_DPfor FDI usage and configure PCH FDI/IO" from our documentation.
Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c void ironlake_init_pch_refclk(struct drm_device *dev) · line 5003
Quoted 4 lines
Signed-off-by Paulo Zanoni <[email protected]>drivers/gpu/drm/i915/intel_display.c +2
-0+if (IS_HASWELL (dev) && (dev->pci_device &0xFF00 ) ==0x0C00 ) + is_sdv = true;Maybe have a
IS_SDV()orIS_HSW_SDV()macro like we have aIS_ULT()one? The check should be on the PCH revision but hopefully there's a 1:1 correlation?
We should just remove this code in the future, maybe even now... I did not care too much about creating a macro since this is going to be killed.
Quoted 7 lines
drivers/gpu/drm/i915/intel_display.c void ironlake_init_pch_refclk(struct drm_device *dev) · line 5023
Quoted 4 lines
drivers/gpu/drm/i915/intel_display.c +3
-0+if (wait_for_atomic_us (I915_READ (SOUTH_CHICKEN2 ) & +FDI_MPHY_IOSFSB_RESET_STATUS ,100 )) +DRM_ERROR ("FDI mPHY resert assert timeout\n" );s/resert/reset/
Quoted 15 lines
drivers/gpu/drm/i915/intel_display.c void ironlake_init_pch_refclk(struct drm_device *dev) · line 5033
Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +10
-0+ + tmp =I915_READ (SOUTH_CHICKEN2 ); + tmp &= ~FDI_MPHY_IOSFSB_RESET_CTL ; +I915_WRITE (SOUTH_CHICKEN2 , tmp); + +if (wait_for_atomic_us ((I915_READ (SOUTH_CHICKEN2 ) & +FDI_MPHY_IOSFSB_RESET_STATUS ) ==0 , +100 )) +DRM_ERROR ("FDI mPHY reset de-assert timeout\n" ); + }When either of those two waits error out, we carry on the sequence. We should probably fail and disable the VGA output (one of those error paths that never get to be tested, yey! I don't know how well we support connectors disappearing)?
We have this "pattern" in many places: the doc tells us "wait for this bit or wait at least XXXms", then we wait using wait_for and print DRM_ERROR in case we timeout. In theory, even if we hit the timeout, we should be fine since we've already waited for the amount of time the spec tells us to wait... I'm not really sure what's the best thing to do here, but it really seems we're probably never hit the "fail" path.
Quoted 6 lines
drivers/gpu/drm/i915/intel_display.c void ironlake_init_pch_refclk(struct drm_device *dev) · line 5141
Quoted 4 lines
drivers/gpu/drm/i915/intel_display.c +3
-0+ tmp =intel_sbi_read (dev_priv,SBI_DBUFF0 ,SBI_ICLK ); + tmp |=SBI_DBUFF0_ENABLE ; +intel_sbi_write (dev_priv,SBI_DBUFF0 , tmp,SBI_ICLK );Th ULT path is missing there.
The ULT will never reach this point, there's not VGA.
Quoted 7 lines
I double checked the programming, looks good. I'll follow up with an amended patch for the 2 first bikesheds, leave the error path alone, and add the ULT path as a separate patch.
--
Damien
Signature · 1 line
Paulo Zanoni
Re: [PATCH 2/3] drm/i915: add lpt_init_pch_refclk
Quoted 18 lines · Paulo Zanoni
Hi
2012/12/8 Damien Lespiau <[email protected]>:
Quoted 15 lines · Paulo Zanoni
Quoted 13 lines
From: Paulo Zanoni <[email protected]>
We need this code to init the PCH SSC refclk and the FDI registers. The BIOS does this too and that's why VGA worked before this patch, until you tried to suspend the machine...
This patch implements the "Sequence to enable
CLKOUT_DPfor FDI usage and configure PCH FDI/IO" from our documentation.Signed-off-by Paulo Zanoni <[email protected]>drivers/gpu/drm/i915/intel_display.c +2
-0+if (IS_HASWELL (dev) && (dev->pci_device &0xFF00 ) ==0x0C00 ) + is_sdv = true;
Quoted 7 lines
Quoted 3 lines
Maybe have a
IS_SDV()orIS_HSW_SDV()macro like we have aIS_ULT()one? The check should be on the PCH revision but hopefully there's a 1:1 correlation?We should just remove this code in the future, maybe even now... I did not care too much about creating a macro since this is going to be killed.
Added a comment to remind us of that.
Quoted 23 lines
Quoted 7 lines
drivers/gpu/drm/i915/intel_display.c void ironlake_init_pch_refclk(struct drm_device *dev) · line 5023
Quoted 4 lines
drivers/gpu/drm/i915/intel_display.c +3
-0+if (wait_for_atomic_us (I915_READ (SOUTH_CHICKEN2 ) & +FDI_MPHY_IOSFSB_RESET_STATUS ,100 )) +DRM_ERROR ("FDI mPHY resert assert timeout\n" );s/resert/reset/
Quoted 15 lines
drivers/gpu/drm/i915/intel_display.c void ironlake_init_pch_refclk(struct drm_device *dev) · line 5033
Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +10
-0+ + tmp =I915_READ (SOUTH_CHICKEN2 ); + tmp &= ~FDI_MPHY_IOSFSB_RESET_CTL ; +I915_WRITE (SOUTH_CHICKEN2 , tmp); + +if (wait_for_atomic_us ((I915_READ (SOUTH_CHICKEN2 ) & +FDI_MPHY_IOSFSB_RESET_STATUS ) ==0 , +100 )) +DRM_ERROR ("FDI mPHY reset de-assert timeout\n" ); + }When either of those two waits error out, we carry on the sequence. We should probably fail and disable the VGA output (one of those error paths that never get to be tested, yey! I don't know how well we support connectors disappearing)?
Quoted 7 lines
We have this "pattern" in many places: the doc tells us "wait for this bit or wait at least XXXms", then we wait using
wait_forand printDRM_ERRORin case we timeout. In theory, even if we hit the timeout, we should be fine since we've already waited for the amount of time the spec tells us to wait... I'm not really sure what's the best thing to do here, but it really seems we're probably never hit the "fail" path.
Imo this is ok. If the hw is in a non-cooperative mood, there's not much we can do than detect it and hope for the best.
Quoted 7 lines
Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c void ironlake_init_pch_refclk(struct drm_device *dev) · line 5141
Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +3
-0+ tmp =intel_sbi_read (dev_priv,SBI_DBUFF0 ,SBI_ICLK ); + tmp |=SBI_DBUFF0_ENABLE ; +intel_sbi_write (dev_priv,SBI_DBUFF0 , tmp,SBI_ICLK );Th ULT path is missing there.
The ULT will never reach this point, there's not VGA.
Added a comment.
Another bikeshed: Can we have less magic here, or are the docs as opaque as the code here? I've merged it for now, but usually Dave' doesn't like this much magic in the code, so a fixup patch would be nice. Imo just giving the register some names should be good enough.
Cheers, Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Re: [PATCH 2/3] drm/i915: add lpt_init_pch_refclk
Quoted 9 lines · Daniel Vetter
Quoted 7 lines
Quoted 5 lines
drivers/gpu/drm/i915/intel_display.c void ironlake_init_pch_refclk(struct drm_device *dev) · line 5141
Quoted 3 lines
drivers/gpu/drm/i915/intel_display.c +3
-0+ tmp =intel_sbi_read (dev_priv,SBI_DBUFF0 ,SBI_ICLK ); + tmp |=SBI_DBUFF0_ENABLE ; +intel_sbi_write (dev_priv,SBI_DBUFF0 , tmp,SBI_ICLK );Th ULT path is missing there.
The ULT will never reach this point, there's not VGA.
Added a comment.
To go to the bottom of this, I wanted to understand why you can enable the PCH SSC.
It is recommended to use the internal SSC source on ULT platforms. The PCH SSC source is then only used for clock bending. Fortunately the PLL Select bits in SPLL_CTL paper over this difference between the internal and PCH SSC sources, selecting the right one based on a fused bit.
And Paulo does check if we have VGA at the start, so indeed, all is good (I believe)!
Signature · 1 line
Damien
Re: [PATCH 2/3] drm/i915: add lpt_init_pch_refclk
In reply to Paulo ZanoniQuoted 10 lines · Paulo Zanoni
Hi
2012/12/8 Damien Lespiau <[email protected]>:
Quoted 3 lines
Maybe have a
IS_SDV()orIS_HSW_SDV()macro like we have aIS_ULT()one? The check should be on the PCH revision but hopefully there's a 1:1 correlation?We should just remove this code in the future, maybe even now... I did not care too much about creating a macro since this is going to be killed.
On the other hand, it's easy to grep for IS_SDV() rather than other more complex tests. We could even expand the macro to other platforms and have a single way to mark SDV code paths.
Signature · 1 line
Damien
PATCH 3/3 drm/i915: set the LPT FDI RX polarity reversal bit when needed
In reply to Paulo ZanoniFrom: Paulo Zanoni <[email protected]>
If we fail to set the bit when needed we get some nice FDI link training failures (AKA "black screen on VGA output").
While we don't really know how to properly choose whether we need to set the bit or not (VBT?), just read the initial value set by the BIOS and store it for later usage.
--- drivers/gpu/drm/i915/i915_drv.h | 2 ++ drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_crt.c | 8 ++++++++ drivers/gpu/drm/i915/intel_ddi.c | 2 ++ 4 files changed, 13 insertions(+)
drivers/gpu/drm/i915/i915_drv.h +2 -0
@@ -915,6 +915,8 @@ typedef struct drm_i915_private {bool hw_contexts_disabled;uint32_t hw_context_size; +bool fdi_rx_polarity_reversed; +struct i915_suspend_saved_registers regfile;/* Old dri1 support infrastructure, beware the dragons ya fools entering
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -3917,6 +3917,7 @@#define FDI_FS_ERRC_ENABLE (1<<27)#define FDI_FE_ERRC_ENABLE (1<<26)#define FDI_DP_PORT_WIDTH_X8 (7<<19) +#define FDI_RX_POLARITY_REVERSED_LPT (1<<16)#define FDI_8BPC (0<<16)#define FDI_10BPC (1<<16)#define FDI_6BPC (2<<16)
drivers/gpu/drm/i915/intel_crt.c +8 -0
@@ -798,4 +798,12 @@ void intel_crt_init(struct drm_device *dev) crt->force_hotplug_required =0 ; dev_priv->hotplug_supported_mask |=CRT_HOTPLUG_INT_STATUS ; + +/* +* TODO: find a proper way to discover whether we need to set the +* polarity reversal bit or not, instead of relying on the BIOS. +*/ +if (HAS_PCH_LPT (dev)) + dev_priv->fdi_rx_polarity_reversed = + !!(I915_READ (_FDI_RXA_CTL) &FDI_RX_POLARITY_REVERSED_LPT ); }
drivers/gpu/drm/i915/intel_ddi.c +2 -0
@@ -180,6 +180,8 @@ void hsw_fdi_link_train(struct drm_crtc *crtc)/* Enable the PCH Receiver FDI PLL */ rx_ctl_val =FDI_RX_PLL_ENABLE |FDI_RX_ENHANCE_FRAME_ENABLE | ((intel_crtc->fdi_lanes -1 ) <<19 ); +if (dev_priv->fdi_rx_polarity_reversed) + rx_ctl_val |=FDI_RX_POLARITY_REVERSED_LPT ;I915_WRITE (_FDI_RXA_CTL, rx_ctl_val);POSTING_READ (_FDI_RXA_CTL);udelay (220 );
Signature · 1 line
1.7.11.7
Re: [PATCH 3/3] drm/i915: set the LPT FDI RX polarity reversal bit when needed
Quoted 10 lines · Paulo Zanoni
From: Paulo Zanoni <[email protected]>
If we fail to set the bit when needed we get some nice FDI link training failures (AKA "black screen on VGA output").
While we don't really know how to properly choose whether we need to set the bit or not (VBT?), just read the initial value set by the BIOS and store it for later usage.
Signed-off-by Paulo Zanoni <[email protected]>
Sad that we did not catch that before. It's not just the polarity (support for exchanging the - and + wires on a differential pair), but also the FDI lane reversal (0 becomes 3, 1 becomes 2) setting that we need to preserve. There's a fused bit for the DMI lane reversal and FDI defaults to following that DMI lane reversal configuration, but we also have a bit to override that behaviour in the FDI RX register, we need to preserve this bit as well.
I think this is the same story for DDI_BUF_CTL, DDI ports support lane reversal.
I could not find either where these settings are stored, preserving what the BIOS does for those seems the best option so far.
Signature · 1 line
Damien
Re: [PATCH 3/3] drm/i915: set the LPT FDI RX polarity reversal bit when needed
Hi
2012/12/8 Damien Lespiau <[email protected]>:
Quoted 12 lines · Paulo Zanoni
Quoted 10 lines
From: Paulo Zanoni <[email protected]>
If we fail to set the bit when needed we get some nice FDI link training failures (AKA "black screen on VGA output").
While we don't really know how to properly choose whether we need to set the bit or not (VBT?), just read the initial value set by the BIOS and store it for later usage.
Signed-off-by Paulo Zanoni <[email protected]>
Quoted 7 lines
Sad that we did not catch that before. It's not just the polarity (support for exchanging the - and + wires on a differential pair), but also the FDI lane reversal (0 becomes 3, 1 becomes 2) setting that we need to preserve. There's a fused bit for the DMI lane reversal and FDI defaults to following that DMI lane reversal configuration, but we also have a bit to override that behaviour in the FDI RX register, we need to preserve this bit as well.
They're different problems and require different patches. This one fixes the "FDI RX polarity" problem, not "lane reversal".
Quoted 8 lines
I think this is the same story for
DDI_BUF_CTL, DDI ports support lane reversal.I could not find either where these settings are stored, preserving what the BIOS does for those seems the best option so far.
--
Damien
Signature · 1 line
Paulo Zanoni
Daniel Vetter
AppliedRe: [PATCH 3/3] drm/i915: set the LPT FDI RX polarity reversal bit when needed
Quoted 23 lines · Paulo Zanoni
Hi
2012/12/8 Damien Lespiau <[email protected]>:
Quoted 12 lines · Paulo Zanoni
Quoted 10 lines
From: Paulo Zanoni <[email protected]>
If we fail to set the bit when needed we get some nice FDI link training failures (AKA "black screen on VGA output").
While we don't really know how to properly choose whether we need to set the bit or not (VBT?), just read the initial value set by the BIOS and store it for later usage.
Signed-off-by Paulo Zanoni <[email protected]>Quoted 7 lines
Sad that we did not catch that before. It's not just the polarity (support for exchanging the - and + wires on a differential pair), but also the FDI lane reversal (0 becomes 3, 1 becomes 2) setting that we need to preserve. There's a fused bit for the DMI lane reversal and FDI defaults to following that DMI lane reversal configuration, but we also have a bit to override that behaviour in the FDI RX register, we need to preserve this bit as well.
Quoted 2 lines
They're different problems and require different patches. This one fixes the "FDI RX polarity" problem, not "lane reversal".
Picked up for -fixes (together with patch 1), thanks for the patch. -Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch