Commit 4d6e198a authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Simplify DPLL state checker calling convention

Make life simpler by just passing in the atomic state + crtc
instead of plumbing in all kinds of crtc states.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231004155607.7719-5-ville.syrjala@linux.intel.comReviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
parent cfc7109b
...@@ -4512,11 +4512,14 @@ verify_single_dpll_state(struct drm_i915_private *i915, ...@@ -4512,11 +4512,14 @@ verify_single_dpll_state(struct drm_i915_private *i915,
"pll hw state mismatch\n"); "pll hw state mismatch\n");
} }
void intel_shared_dpll_state_verify(struct intel_crtc *crtc, void intel_shared_dpll_state_verify(struct intel_atomic_state *state,
const struct intel_crtc_state *old_crtc_state, struct intel_crtc *crtc)
const struct intel_crtc_state *new_crtc_state)
{ {
struct drm_i915_private *i915 = to_i915(crtc->base.dev); struct drm_i915_private *i915 = to_i915(state->base.dev);
const struct intel_crtc_state *old_crtc_state =
intel_atomic_get_old_crtc_state(state, crtc);
const struct intel_crtc_state *new_crtc_state =
intel_atomic_get_new_crtc_state(state, crtc);
if (new_crtc_state->shared_dpll) if (new_crtc_state->shared_dpll)
verify_single_dpll_state(i915, new_crtc_state->shared_dpll, verify_single_dpll_state(i915, new_crtc_state->shared_dpll,
...@@ -4536,8 +4539,9 @@ void intel_shared_dpll_state_verify(struct intel_crtc *crtc, ...@@ -4536,8 +4539,9 @@ void intel_shared_dpll_state_verify(struct intel_crtc *crtc,
} }
} }
void intel_shared_dpll_verify_disabled(struct drm_i915_private *i915) void intel_shared_dpll_verify_disabled(struct intel_atomic_state *state)
{ {
struct drm_i915_private *i915 = to_i915(state->base.dev);
struct intel_shared_dpll *pll; struct intel_shared_dpll *pll;
int i; int i;
......
...@@ -369,9 +369,8 @@ void intel_dpll_dump_hw_state(struct drm_i915_private *i915, ...@@ -369,9 +369,8 @@ void intel_dpll_dump_hw_state(struct drm_i915_private *i915,
enum intel_dpll_id icl_tc_port_to_pll_id(enum tc_port tc_port); enum intel_dpll_id icl_tc_port_to_pll_id(enum tc_port tc_port);
bool intel_dpll_is_combophy(enum intel_dpll_id id); bool intel_dpll_is_combophy(enum intel_dpll_id id);
void intel_shared_dpll_state_verify(struct intel_crtc *crtc, void intel_shared_dpll_state_verify(struct intel_atomic_state *state,
const struct intel_crtc_state *old_crtc_state, struct intel_crtc *crtc);
const struct intel_crtc_state *new_crtc_state); void intel_shared_dpll_verify_disabled(struct intel_atomic_state *state);
void intel_shared_dpll_verify_disabled(struct drm_i915_private *i915);
#endif /* _INTEL_DPLL_MGR_H_ */ #endif /* _INTEL_DPLL_MGR_H_ */
...@@ -236,7 +236,7 @@ void intel_modeset_verify_crtc(struct intel_crtc *crtc, ...@@ -236,7 +236,7 @@ void intel_modeset_verify_crtc(struct intel_crtc *crtc,
intel_wm_state_verify(crtc, new_crtc_state); intel_wm_state_verify(crtc, new_crtc_state);
verify_connector_state(state, crtc); verify_connector_state(state, crtc);
verify_crtc_state(state, crtc); verify_crtc_state(state, crtc);
intel_shared_dpll_state_verify(crtc, old_crtc_state, new_crtc_state); intel_shared_dpll_state_verify(state, crtc);
intel_mpllb_state_verify(state, new_crtc_state); intel_mpllb_state_verify(state, new_crtc_state);
intel_c10pll_state_verify(state, new_crtc_state); intel_c10pll_state_verify(state, new_crtc_state);
} }
...@@ -246,5 +246,5 @@ void intel_modeset_verify_disabled(struct drm_i915_private *dev_priv, ...@@ -246,5 +246,5 @@ void intel_modeset_verify_disabled(struct drm_i915_private *dev_priv,
{ {
verify_encoder_state(dev_priv, state); verify_encoder_state(dev_priv, state);
verify_connector_state(state, NULL); verify_connector_state(state, NULL);
intel_shared_dpll_verify_disabled(dev_priv); intel_shared_dpll_verify_disabled(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