aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_display.c
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2014-05-23 16:16:40 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-06-05 02:52:34 -0400
commit570210598444f2b9c20db8b0e7a877633a3cb1ea (patch)
tree21e502c7110c2fcf7b3d5d8a7e1b7d6dbd98cc0f /drivers/gpu/drm/i915/intel_display.c
parentc315faf8e6ec7a8e59bc1f95f66841a78879ae72 (diff)
drm/i915/vlv: assert and de-assert sideband reset at boot and resume v3
This is a bit like the CMN reset de-assert we do in DPIO_CTL, except that it resets the whole common lane section of the PHY. This is required on machines where the BIOS doesn't do this for us on boot or resume to properly re-calibrate and get the PHY ready to transmit data. Without this patch, such machines won't resume correctly much of the time, with the symptom being a 'port ready' timeout and/or a link training failure. Note that simply asserting reset at suspend and de-asserting at resume is not sufficient, nor is simply de-asserting at boot. Both of these cases have been tested and have still been found to have failures on some configurations. v2: extract simpler set_power_well function for use in reset_dpio (Imre) move to reset_dpio (Daniel & Ville) v3: don't reset if DPIO reset is already de-asserted (Imre) Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 1ce4ad4626e4..bcbd742149c6 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1516,6 +1516,25 @@ static void intel_reset_dpio(struct drm_device *dev)
1516 1516
1517 } else { 1517 } else {
1518 /* 1518 /*
1519 * If DPIO has already been reset, e.g. by BIOS, just skip all
1520 * this.
1521 */
1522 if (I915_READ(DPIO_CTL) & DPIO_CMNRST)
1523 return;
1524
1525 /*
1526 * From VLV2A0_DP_eDP_HDMI_DPIO_driver_vbios_notes_11.docx:
1527 * Need to assert and de-assert PHY SB reset by gating the
1528 * common lane power, then un-gating it.
1529 * Simply ungating isn't enough to reset the PHY enough to get
1530 * ports and lanes running.
1531 */
1532 __vlv_set_power_well(dev_priv, PUNIT_POWER_WELL_DPIO_CMN_BC,
1533 false);
1534 __vlv_set_power_well(dev_priv, PUNIT_POWER_WELL_DPIO_CMN_BC,
1535 true);
1536
1537 /*
1519 * From VLV2A0_DP_eDP_DPIO_driver_vbios_notes_10.docx - 1538 * From VLV2A0_DP_eDP_DPIO_driver_vbios_notes_10.docx -
1520 * 6. De-assert cmn_reset/side_reset. Same as VLV X0. 1539 * 6. De-assert cmn_reset/side_reset. Same as VLV X0.
1521 * a. GUnit 0x2110 bit[0] set to 1 (def 0) 1540 * a. GUnit 0x2110 bit[0] set to 1 (def 0)