drm/i915: Check pipe_config.has_dp_encoder instead of encoder types

More concise. Noticed while reviewing Ander's patch which touched a
lot of the pipe_has_type checks.

v2: Use new_config in one place Ander spotted.

Cc: Ander Conselvan de Oliveira <conselvan2@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
This commit is contained in:
Daniel Vetter 2014-11-03 14:37:38 +01:00
parent d0737e1d59
commit 0a88818d09

View File

@ -3786,9 +3786,7 @@ static void ironlake_pch_enable(struct drm_crtc *crtc)
intel_fdi_normal_train(crtc); intel_fdi_normal_train(crtc);
/* For PCH DP, enable TRANS_DP_CTL */ /* For PCH DP, enable TRANS_DP_CTL */
if (HAS_PCH_CPT(dev) && if (HAS_PCH_CPT(dev) && intel_crtc->config.has_dp_encoder) {
(intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT) ||
intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_EDP))) {
u32 bpc = (I915_READ(PIPECONF(pipe)) & PIPECONF_BPC_MASK) >> 5; u32 bpc = (I915_READ(PIPECONF(pipe)) & PIPECONF_BPC_MASK) >> 5;
reg = TRANS_DP_CTL(pipe); reg = TRANS_DP_CTL(pipe);
temp = I915_READ(reg); temp = I915_READ(reg);
@ -5867,8 +5865,7 @@ static void vlv_prepare_pll(struct intel_crtc *crtc,
vlv_dpio_write(dev_priv, pipe, VLV_PLL_DW10(pipe), vlv_dpio_write(dev_priv, pipe, VLV_PLL_DW10(pipe),
0x00d0000f); 0x00d0000f);
if (intel_pipe_has_type(crtc, INTEL_OUTPUT_EDP) || if (crtc->config.has_dp_encoder) {
intel_pipe_has_type(crtc, INTEL_OUTPUT_DISPLAYPORT)) {
/* Use SSC source */ /* Use SSC source */
if (pipe == PIPE_A) if (pipe == PIPE_A)
vlv_dpio_write(dev_priv, pipe, VLV_PLL_DW5(pipe), vlv_dpio_write(dev_priv, pipe, VLV_PLL_DW5(pipe),
@ -6058,7 +6055,7 @@ static void i9xx_update_pll(struct intel_crtc *crtc,
if (is_sdvo) if (is_sdvo)
dpll |= DPLL_SDVO_HIGH_SPEED; dpll |= DPLL_SDVO_HIGH_SPEED;
if (intel_pipe_will_have_type(crtc, INTEL_OUTPUT_DISPLAYPORT)) if (crtc->new_config->has_dp_encoder)
dpll |= DPLL_SDVO_HIGH_SPEED; dpll |= DPLL_SDVO_HIGH_SPEED;
/* compute bitmask from p1 value */ /* compute bitmask from p1 value */