aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2016-09-26 04:30:46 -0400
committerVille Syrjälä <ville.syrjala@linux.intel.com>2016-09-28 09:57:44 -0400
commit7d7f8633a82763577727762ff3ac1df3017cb8fe (patch)
treef4421d2018ff8961a9ef1725108133d4ac56d0a7
parent577c543005dbb809b7880ac17c3f760b20af60e2 (diff)
drm/i915: Allow PCH DPLL sharing regardless of DPLL_SDVO_HIGH_SPEED
DPLL_SDVO_HIGH_SPEED must be set for SDVO/HDMI/DP, but nowhere is it forbidden to set it for LVDS/CRT as well. So let's also set it on CRT to make it possible to share the DPLL between HDMI and CRT. What that bit apparently does is enable the x5 clock to the port, which then pumps out the bits on both edges of the clock. The DAC doesn't need that clock since it's not pumping out bits, but I don't think it hurts to have the DPLL output that clock anyway. This is fairly important on IVB since it has only two DPLLs with three pipes. So trying to drive three or more PCH ports with three pipes is only possible when at least one of the DPLLs gets shared between two of the pipes. SNB doesn't really need to do this since it has only two pipes. It could be done to avoid enabling the second DPLL at all in certain cases, but I'm not sure that's such a huge win. So let's not do it for SNB, at least for now. On ILK it never makes sense as the DPLLs can't be shared. v2: Just always enable the high speed clock to keep things simple (Daniel) Beef up the commit message a bit (Daniel) Cc: Nick Yamane <nick.diego@gmail.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: stable@vger.kernel.org Tested-by: Nick Yamane <nick.diego@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97204 Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1474878646-17711-1-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
-rw-r--r--drivers/gpu/drm/i915/intel_display.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index e31d3e6d6647..8a24c4492ce2 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9510,6 +9510,24 @@ static void ironlake_compute_dpll(struct intel_crtc *intel_crtc,
9510 if (intel_crtc_has_dp_encoder(crtc_state)) 9510 if (intel_crtc_has_dp_encoder(crtc_state))
9511 dpll |= DPLL_SDVO_HIGH_SPEED; 9511 dpll |= DPLL_SDVO_HIGH_SPEED;
9512 9512
9513 /*
9514 * The high speed IO clock is only really required for
9515 * SDVO/HDMI/DP, but we also enable it for CRT to make it
9516 * possible to share the DPLL between CRT and HDMI. Enabling
9517 * the clock needlessly does no real harm, except use up a
9518 * bit of power potentially.
9519 *
9520 * We'll limit this to IVB with 3 pipes, since it has only two
9521 * DPLLs and so DPLL sharing is the only way to get three pipes
9522 * driving PCH ports at the same time. On SNB we could do this,
9523 * and potentially avoid enabling the second DPLL, but it's not
9524 * clear if it''s a win or loss power wise. No point in doing
9525 * this on ILK at all since it has a fixed DPLL<->pipe mapping.
9526 */
9527 if (INTEL_INFO(dev_priv)->num_pipes == 3 &&
9528 intel_crtc_has_type(crtc_state, INTEL_OUTPUT_ANALOG))
9529 dpll |= DPLL_SDVO_HIGH_SPEED;
9530
9513 /* compute bitmask from p1 value */ 9531 /* compute bitmask from p1 value */
9514 dpll |= (1 << (crtc_state->dpll.p1 - 1)) << DPLL_FPA01_P1_POST_DIV_SHIFT; 9532 dpll |= (1 << (crtc_state->dpll.p1 - 1)) << DPLL_FPA01_P1_POST_DIV_SHIFT;
9515 /* also FPA1 */ 9533 /* also FPA1 */