Commit 7efd90fb authored by Maarten Lankhorst's avatar Maarten Lankhorst

drm/i915: Use crtc_state in ironlake_enable_pch_transcoder

Rename intel_crtc to crtc, and pass crtc_state so we don't have to
dereference crtc->config.
Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181004094604.2646-5-maarten.lankhorst@linux.intel.com
parent 44fe7f35
...@@ -1666,16 +1666,16 @@ void vlv_wait_port_ready(struct drm_i915_private *dev_priv, ...@@ -1666,16 +1666,16 @@ void vlv_wait_port_ready(struct drm_i915_private *dev_priv,
I915_READ(dpll_reg) & port_mask, expected_mask); I915_READ(dpll_reg) & port_mask, expected_mask);
} }
static void ironlake_enable_pch_transcoder(struct drm_i915_private *dev_priv, static void ironlake_enable_pch_transcoder(const struct intel_crtc_state *crtc_state)
enum pipe pipe)
{ {
struct intel_crtc *intel_crtc = intel_get_crtc_for_pipe(dev_priv, struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc);
pipe); struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
enum pipe pipe = crtc->pipe;
i915_reg_t reg; i915_reg_t reg;
uint32_t val, pipeconf_val; uint32_t val, pipeconf_val;
/* Make sure PCH DPLL is enabled */ /* Make sure PCH DPLL is enabled */
assert_shared_dpll_enabled(dev_priv, intel_crtc->config->shared_dpll); assert_shared_dpll_enabled(dev_priv, crtc_state->shared_dpll);
/* FDI must be feeding us bits for PCH ports */ /* FDI must be feeding us bits for PCH ports */
assert_fdi_tx_enabled(dev_priv, pipe); assert_fdi_tx_enabled(dev_priv, pipe);
...@@ -1701,7 +1701,7 @@ static void ironlake_enable_pch_transcoder(struct drm_i915_private *dev_priv, ...@@ -1701,7 +1701,7 @@ static void ironlake_enable_pch_transcoder(struct drm_i915_private *dev_priv,
* here for both 8bpc and 12bpc. * here for both 8bpc and 12bpc.
*/ */
val &= ~PIPECONF_BPC_MASK; val &= ~PIPECONF_BPC_MASK;
if (intel_crtc_has_type(intel_crtc->config, INTEL_OUTPUT_HDMI)) if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
val |= PIPECONF_8BPC; val |= PIPECONF_8BPC;
else else
val |= pipeconf_val & PIPECONF_BPC_MASK; val |= pipeconf_val & PIPECONF_BPC_MASK;
...@@ -1710,7 +1710,7 @@ static void ironlake_enable_pch_transcoder(struct drm_i915_private *dev_priv, ...@@ -1710,7 +1710,7 @@ static void ironlake_enable_pch_transcoder(struct drm_i915_private *dev_priv,
val &= ~TRANS_INTERLACE_MASK; val &= ~TRANS_INTERLACE_MASK;
if ((pipeconf_val & PIPECONF_INTERLACE_MASK) == PIPECONF_INTERLACED_ILK) if ((pipeconf_val & PIPECONF_INTERLACE_MASK) == PIPECONF_INTERLACED_ILK)
if (HAS_PCH_IBX(dev_priv) && if (HAS_PCH_IBX(dev_priv) &&
intel_crtc_has_type(intel_crtc->config, INTEL_OUTPUT_SDVO)) intel_crtc_has_type(crtc_state, INTEL_OUTPUT_SDVO))
val |= TRANS_LEGACY_INTERLACED_ILK; val |= TRANS_LEGACY_INTERLACED_ILK;
else else
val |= TRANS_INTERLACED; val |= TRANS_INTERLACED;
...@@ -4793,7 +4793,7 @@ static void ironlake_pch_enable(const struct intel_atomic_state *state, ...@@ -4793,7 +4793,7 @@ static void ironlake_pch_enable(const struct intel_atomic_state *state,
I915_WRITE(reg, temp); I915_WRITE(reg, temp);
} }
ironlake_enable_pch_transcoder(dev_priv, pipe); ironlake_enable_pch_transcoder(crtc_state);
} }
static void lpt_pch_enable(const struct intel_atomic_state *state, static void lpt_pch_enable(const struct intel_atomic_state *state,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment