Skip to content

Commit 4d6e198

Browse files
committed
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: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231004155607.7719-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
1 parent cfc7109 commit 4d6e198

3 files changed

Lines changed: 14 additions & 11 deletions

File tree

drivers/gpu/drm/i915/display/intel_dpll_mgr.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4512,11 +4512,14 @@ verify_single_dpll_state(struct drm_i915_private *i915,
45124512
"pll hw state mismatch\n");
45134513
}
45144514

4515-
void intel_shared_dpll_state_verify(struct intel_crtc *crtc,
4516-
const struct intel_crtc_state *old_crtc_state,
4517-
const struct intel_crtc_state *new_crtc_state)
4515+
void intel_shared_dpll_state_verify(struct intel_atomic_state *state,
4516+
struct intel_crtc *crtc)
45184517
{
4519-
struct drm_i915_private *i915 = to_i915(crtc->base.dev);
4518+
struct drm_i915_private *i915 = to_i915(state->base.dev);
4519+
const struct intel_crtc_state *old_crtc_state =
4520+
intel_atomic_get_old_crtc_state(state, crtc);
4521+
const struct intel_crtc_state *new_crtc_state =
4522+
intel_atomic_get_new_crtc_state(state, crtc);
45204523

45214524
if (new_crtc_state->shared_dpll)
45224525
verify_single_dpll_state(i915, new_crtc_state->shared_dpll,
@@ -4536,8 +4539,9 @@ void intel_shared_dpll_state_verify(struct intel_crtc *crtc,
45364539
}
45374540
}
45384541

4539-
void intel_shared_dpll_verify_disabled(struct drm_i915_private *i915)
4542+
void intel_shared_dpll_verify_disabled(struct intel_atomic_state *state)
45404543
{
4544+
struct drm_i915_private *i915 = to_i915(state->base.dev);
45414545
struct intel_shared_dpll *pll;
45424546
int i;
45434547

drivers/gpu/drm/i915/display/intel_dpll_mgr.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -369,9 +369,8 @@ void intel_dpll_dump_hw_state(struct drm_i915_private *i915,
369369
enum intel_dpll_id icl_tc_port_to_pll_id(enum tc_port tc_port);
370370
bool intel_dpll_is_combophy(enum intel_dpll_id id);
371371

372-
void intel_shared_dpll_state_verify(struct intel_crtc *crtc,
373-
const struct intel_crtc_state *old_crtc_state,
374-
const struct intel_crtc_state *new_crtc_state);
375-
void intel_shared_dpll_verify_disabled(struct drm_i915_private *i915);
372+
void intel_shared_dpll_state_verify(struct intel_atomic_state *state,
373+
struct intel_crtc *crtc);
374+
void intel_shared_dpll_verify_disabled(struct intel_atomic_state *state);
376375

377376
#endif /* _INTEL_DPLL_MGR_H_ */

drivers/gpu/drm/i915/display/intel_modeset_verify.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ void intel_modeset_verify_crtc(struct intel_crtc *crtc,
236236
intel_wm_state_verify(crtc, new_crtc_state);
237237
verify_connector_state(state, crtc);
238238
verify_crtc_state(state, crtc);
239-
intel_shared_dpll_state_verify(crtc, old_crtc_state, new_crtc_state);
239+
intel_shared_dpll_state_verify(state, crtc);
240240
intel_mpllb_state_verify(state, new_crtc_state);
241241
intel_c10pll_state_verify(state, new_crtc_state);
242242
}
@@ -246,5 +246,5 @@ void intel_modeset_verify_disabled(struct drm_i915_private *dev_priv,
246246
{
247247
verify_encoder_state(dev_priv, state);
248248
verify_connector_state(state, NULL);
249-
intel_shared_dpll_verify_disabled(dev_priv);
249+
intel_shared_dpll_verify_disabled(state);
250250
}

0 commit comments

Comments
 (0)