Skip to content

Commit 8f0994d

Browse files
committed
drm/i915: Simplify watermark state checker calling convention
There is never any reason to pass in both the crtc and its state as one can always dig out the crtc from its state. But for more consistency across the whole state checker let's just pass the overall atomic state+crtc here as well. v2: Also pass state+crtc here (Jani) Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231005122713.3531-1-ville.syrjala@linux.intel.com
1 parent 487a2db commit 8f0994d

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ void intel_modeset_verify_crtc(struct intel_crtc *crtc,
233233
!intel_crtc_needs_fastset(new_crtc_state))
234234
return;
235235

236-
intel_wm_state_verify(crtc, new_crtc_state);
236+
intel_wm_state_verify(state, crtc);
237237
verify_connector_state(state, crtc);
238238
verify_crtc_state(state, crtc);
239239
intel_shared_dpll_state_verify(state, crtc);

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3134,10 +3134,12 @@ static void skl_wm_get_hw_state_and_sanitize(struct drm_i915_private *i915)
31343134
skl_wm_sanitize(i915);
31353135
}
31363136

3137-
void intel_wm_state_verify(struct intel_crtc *crtc,
3138-
const struct intel_crtc_state *new_crtc_state)
3137+
void intel_wm_state_verify(struct intel_atomic_state *state,
3138+
struct intel_crtc *crtc)
31393139
{
3140-
struct drm_i915_private *i915 = to_i915(crtc->base.dev);
3140+
struct drm_i915_private *i915 = to_i915(state->base.dev);
3141+
const struct intel_crtc_state *new_crtc_state =
3142+
intel_atomic_get_new_crtc_state(state, crtc);
31413143
struct skl_hw_state {
31423144
struct skl_ddb_entry ddb[I915_MAX_PLANES];
31433145
struct skl_ddb_entry ddb_y[I915_MAX_PLANES];

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ bool skl_ddb_allocation_overlaps(const struct skl_ddb_entry *ddb,
3838
const struct skl_ddb_entry *entries,
3939
int num_entries, int ignore_idx);
4040

41-
void intel_wm_state_verify(struct intel_crtc *crtc,
42-
const struct intel_crtc_state *new_crtc_state);
41+
void intel_wm_state_verify(struct intel_atomic_state *state,
42+
struct intel_crtc *crtc);
4343

4444
void skl_watermark_ipc_init(struct drm_i915_private *i915);
4545
void skl_watermark_ipc_update(struct drm_i915_private *i915);

0 commit comments

Comments
 (0)