Commit d2432796 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Clean up arguments to nv12/scaler w/a funcs

Don't pass the redundant dev_priv to needs_nv12_wa() and
needs_scalerclk_wa().
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191127190556.1574-2-ville.syrjala@linux.intel.comReviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
parent 13bb5b99
...@@ -6037,9 +6037,10 @@ static bool hsw_post_update_enable_ips(const struct intel_crtc_state *old_crtc_s ...@@ -6037,9 +6037,10 @@ static bool hsw_post_update_enable_ips(const struct intel_crtc_state *old_crtc_s
return !old_crtc_state->ips_enabled; return !old_crtc_state->ips_enabled;
} }
static bool needs_nv12_wa(struct drm_i915_private *dev_priv, static bool needs_nv12_wa(const struct intel_crtc_state *crtc_state)
const struct intel_crtc_state *crtc_state)
{ {
struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev);
if (!crtc_state->nv12_planes) if (!crtc_state->nv12_planes)
return false; return false;
...@@ -6050,9 +6051,10 @@ static bool needs_nv12_wa(struct drm_i915_private *dev_priv, ...@@ -6050,9 +6051,10 @@ static bool needs_nv12_wa(struct drm_i915_private *dev_priv,
return false; return false;
} }
static bool needs_scalerclk_wa(struct drm_i915_private *dev_priv, static bool needs_scalerclk_wa(const struct intel_crtc_state *crtc_state)
const struct intel_crtc_state *crtc_state)
{ {
struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev);
/* Wa_2006604312:icl */ /* Wa_2006604312:icl */
if (crtc_state->scaler_state.scaler_users > 0 && IS_ICELAKE(dev_priv)) if (crtc_state->scaler_state.scaler_users > 0 && IS_ICELAKE(dev_priv))
return true; return true;
...@@ -6093,12 +6095,12 @@ static void intel_post_plane_update(struct intel_crtc_state *old_crtc_state) ...@@ -6093,12 +6095,12 @@ static void intel_post_plane_update(struct intel_crtc_state *old_crtc_state)
intel_post_enable_primary(&crtc->base, pipe_config); intel_post_enable_primary(&crtc->base, pipe_config);
} }
if (needs_nv12_wa(dev_priv, old_crtc_state) && if (needs_nv12_wa(old_crtc_state) &&
!needs_nv12_wa(dev_priv, pipe_config)) !needs_nv12_wa(pipe_config))
skl_wa_827(dev_priv, crtc->pipe, false); skl_wa_827(dev_priv, crtc->pipe, false);
if (needs_scalerclk_wa(dev_priv, old_crtc_state) && if (needs_scalerclk_wa(old_crtc_state) &&
!needs_scalerclk_wa(dev_priv, pipe_config)) !needs_scalerclk_wa(pipe_config))
icl_wa_scalerclkgating(dev_priv, crtc->pipe, false); icl_wa_scalerclkgating(dev_priv, crtc->pipe, false);
} }
...@@ -6135,13 +6137,13 @@ static void intel_pre_plane_update(struct intel_crtc_state *old_crtc_state, ...@@ -6135,13 +6137,13 @@ static void intel_pre_plane_update(struct intel_crtc_state *old_crtc_state,
} }
/* Display WA 827 */ /* Display WA 827 */
if (!needs_nv12_wa(dev_priv, old_crtc_state) && if (!needs_nv12_wa(old_crtc_state) &&
needs_nv12_wa(dev_priv, pipe_config)) needs_nv12_wa(pipe_config))
skl_wa_827(dev_priv, crtc->pipe, true); skl_wa_827(dev_priv, crtc->pipe, true);
/* Wa_2006604312:icl */ /* Wa_2006604312:icl */
if (!needs_scalerclk_wa(dev_priv, old_crtc_state) && if (!needs_scalerclk_wa(old_crtc_state) &&
needs_scalerclk_wa(dev_priv, pipe_config)) needs_scalerclk_wa(pipe_config))
icl_wa_scalerclkgating(dev_priv, crtc->pipe, true); icl_wa_scalerclkgating(dev_priv, crtc->pipe, true);
/* /*
......
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