Commit c0ead703 authored by Maarten Lankhorst's avatar Maarten Lankhorst

drm/i915: Rename hw state checker to hw state verifier.

Check functions are used by atomic to see if the new state will
be allowed. There's also a hw state checker which checks afterwards
that the committed state is correct. Rename it to hw state verifier
to reduce some confusion.
Suggested-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/56FB8785.8020506@linux.intel.comReviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
parent f6d1973d
...@@ -6295,7 +6295,7 @@ void intel_encoder_destroy(struct drm_encoder *encoder) ...@@ -6295,7 +6295,7 @@ void intel_encoder_destroy(struct drm_encoder *encoder)
/* Cross check the actual hw state with our own modeset state tracking (and it's /* Cross check the actual hw state with our own modeset state tracking (and it's
* internal consistency). */ * internal consistency). */
static void intel_connector_check_state(struct intel_connector *connector) static void intel_connector_verify_state(struct intel_connector *connector)
{ {
struct drm_crtc *crtc = connector->base.state->crtc; struct drm_crtc *crtc = connector->base.state->crtc;
...@@ -12756,8 +12756,8 @@ static void intel_pipe_config_sanity_check(struct drm_i915_private *dev_priv, ...@@ -12756,8 +12756,8 @@ static void intel_pipe_config_sanity_check(struct drm_i915_private *dev_priv,
} }
} }
static void check_wm_state(struct drm_crtc *crtc, static void verify_wm_state(struct drm_crtc *crtc,
struct drm_crtc_state *new_state) struct drm_crtc_state *new_state)
{ {
struct drm_device *dev = crtc->dev; struct drm_device *dev = crtc->dev;
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
...@@ -12802,7 +12802,7 @@ static void check_wm_state(struct drm_crtc *crtc, ...@@ -12802,7 +12802,7 @@ static void check_wm_state(struct drm_crtc *crtc,
} }
static void static void
check_connector_state(struct drm_device *dev, struct drm_crtc *crtc) verify_connector_state(struct drm_device *dev, struct drm_crtc *crtc)
{ {
struct drm_connector *connector; struct drm_connector *connector;
...@@ -12813,7 +12813,7 @@ check_connector_state(struct drm_device *dev, struct drm_crtc *crtc) ...@@ -12813,7 +12813,7 @@ check_connector_state(struct drm_device *dev, struct drm_crtc *crtc)
if (state->crtc != crtc) if (state->crtc != crtc)
continue; continue;
intel_connector_check_state(to_intel_connector(connector)); intel_connector_verify_state(to_intel_connector(connector));
I915_STATE_WARN(state->best_encoder != encoder, I915_STATE_WARN(state->best_encoder != encoder,
"connector's atomic encoder doesn't match legacy encoder\n"); "connector's atomic encoder doesn't match legacy encoder\n");
...@@ -12821,7 +12821,7 @@ check_connector_state(struct drm_device *dev, struct drm_crtc *crtc) ...@@ -12821,7 +12821,7 @@ check_connector_state(struct drm_device *dev, struct drm_crtc *crtc)
} }
static void static void
check_encoder_state(struct drm_device *dev) verify_encoder_state(struct drm_device *dev)
{ {
struct intel_encoder *encoder; struct intel_encoder *encoder;
struct intel_connector *connector; struct intel_connector *connector;
...@@ -12861,9 +12861,9 @@ check_encoder_state(struct drm_device *dev) ...@@ -12861,9 +12861,9 @@ check_encoder_state(struct drm_device *dev)
} }
static void static void
check_crtc_state(struct drm_crtc *crtc, verify_crtc_state(struct drm_crtc *crtc,
struct drm_crtc_state *old_crtc_state, struct drm_crtc_state *old_crtc_state,
struct drm_crtc_state *new_crtc_state) struct drm_crtc_state *new_crtc_state)
{ {
struct drm_device *dev = crtc->dev; struct drm_device *dev = crtc->dev;
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
...@@ -12930,10 +12930,10 @@ check_crtc_state(struct drm_crtc *crtc, ...@@ -12930,10 +12930,10 @@ check_crtc_state(struct drm_crtc *crtc,
} }
static void static void
check_single_dpll_state(struct drm_i915_private *dev_priv, verify_single_dpll_state(struct drm_i915_private *dev_priv,
struct intel_shared_dpll *pll, struct intel_shared_dpll *pll,
struct drm_crtc *crtc, struct drm_crtc *crtc,
struct drm_crtc_state *new_state) struct drm_crtc_state *new_state)
{ {
struct intel_dpll_hw_state dpll_hw_state; struct intel_dpll_hw_state dpll_hw_state;
unsigned crtc_mask; unsigned crtc_mask;
...@@ -12985,16 +12985,16 @@ check_single_dpll_state(struct drm_i915_private *dev_priv, ...@@ -12985,16 +12985,16 @@ check_single_dpll_state(struct drm_i915_private *dev_priv,
} }
static void static void
check_shared_dpll_state(struct drm_device *dev, struct drm_crtc *crtc, verify_shared_dpll_state(struct drm_device *dev, struct drm_crtc *crtc,
struct drm_crtc_state *old_crtc_state, struct drm_crtc_state *old_crtc_state,
struct drm_crtc_state *new_crtc_state) struct drm_crtc_state *new_crtc_state)
{ {
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc_state *old_state = to_intel_crtc_state(old_crtc_state); struct intel_crtc_state *old_state = to_intel_crtc_state(old_crtc_state);
struct intel_crtc_state *new_state = to_intel_crtc_state(new_crtc_state); struct intel_crtc_state *new_state = to_intel_crtc_state(new_crtc_state);
if (new_state->shared_dpll) if (new_state->shared_dpll)
check_single_dpll_state(dev_priv, new_state->shared_dpll, crtc, new_crtc_state); verify_single_dpll_state(dev_priv, new_state->shared_dpll, crtc, new_crtc_state);
if (old_state->shared_dpll && if (old_state->shared_dpll &&
old_state->shared_dpll != new_state->shared_dpll) { old_state->shared_dpll != new_state->shared_dpll) {
...@@ -13011,7 +13011,7 @@ check_shared_dpll_state(struct drm_device *dev, struct drm_crtc *crtc, ...@@ -13011,7 +13011,7 @@ check_shared_dpll_state(struct drm_device *dev, struct drm_crtc *crtc,
} }
static void static void
intel_modeset_check_crtc(struct drm_crtc *crtc, intel_modeset_verify_crtc(struct drm_crtc *crtc,
struct drm_crtc_state *old_state, struct drm_crtc_state *old_state,
struct drm_crtc_state *new_state) struct drm_crtc_state *new_state)
{ {
...@@ -13019,28 +13019,28 @@ intel_modeset_check_crtc(struct drm_crtc *crtc, ...@@ -13019,28 +13019,28 @@ intel_modeset_check_crtc(struct drm_crtc *crtc,
!to_intel_crtc_state(new_state)->update_pipe) !to_intel_crtc_state(new_state)->update_pipe)
return; return;
check_wm_state(crtc, new_state); verify_wm_state(crtc, new_state);
check_connector_state(crtc->dev, crtc); verify_connector_state(crtc->dev, crtc);
check_crtc_state(crtc, old_state, new_state); verify_crtc_state(crtc, old_state, new_state);
check_shared_dpll_state(crtc->dev, crtc, old_state, new_state); verify_shared_dpll_state(crtc->dev, crtc, old_state, new_state);
} }
static void static void
check_disabled_dpll_state(struct drm_device *dev) verify_disabled_dpll_state(struct drm_device *dev)
{ {
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
int i; int i;
for (i = 0; i < dev_priv->num_shared_dpll; i++) for (i = 0; i < dev_priv->num_shared_dpll; i++)
check_single_dpll_state(dev_priv, &dev_priv->shared_dplls[i], NULL, NULL); verify_single_dpll_state(dev_priv, &dev_priv->shared_dplls[i], NULL, NULL);
} }
static void static void
intel_modeset_check_disabled(struct drm_device *dev) intel_modeset_verify_disabled(struct drm_device *dev)
{ {
check_encoder_state(dev); verify_encoder_state(dev);
check_connector_state(dev, NULL); verify_connector_state(dev, NULL);
check_disabled_dpll_state(dev); verify_disabled_dpll_state(dev);
} }
static void update_scanline_offset(struct intel_crtc *crtc) static void update_scanline_offset(struct intel_crtc *crtc)
...@@ -13611,7 +13611,7 @@ static int intel_atomic_commit(struct drm_device *dev, ...@@ -13611,7 +13611,7 @@ static int intel_atomic_commit(struct drm_device *dev,
intel_state->dev_cdclk != dev_priv->cdclk_freq) intel_state->dev_cdclk != dev_priv->cdclk_freq)
dev_priv->display.modeset_commit_cdclk(state); dev_priv->display.modeset_commit_cdclk(state);
intel_modeset_check_disabled(dev); intel_modeset_verify_disabled(dev);
} }
/* Now enable the clocks, plane, pipe, and connectors that we set up. */ /* Now enable the clocks, plane, pipe, and connectors that we set up. */
...@@ -13667,7 +13667,7 @@ static int intel_atomic_commit(struct drm_device *dev, ...@@ -13667,7 +13667,7 @@ static int intel_atomic_commit(struct drm_device *dev,
if (put_domains[i]) if (put_domains[i])
modeset_put_power_domains(dev_priv, put_domains[i]); modeset_put_power_domains(dev_priv, put_domains[i]);
intel_modeset_check_crtc(crtc, old_crtc_state, crtc->state); intel_modeset_verify_crtc(crtc, old_crtc_state, crtc->state);
} }
if (intel_state->modeset) if (intel_state->modeset)
......
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