drm/i915: Compute per-crtc min_cdclk earlier

Currently we compute the min_cdclk for each pipe during
intel_cdclk_atomic_check(). But that is too late for the
pipe prefill vs. vblank length checks (done during
intel_compute_global_watermarks).

We can't just reorder these things due to other dependencies,
so instead pull only the per-crtc minimum cdclk calculation
ahead. We should have enough information for that as soon
as we've computed the min cdclk for the planes.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20251013201236.30084-8-ville.syrjala@linux.intel.com
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
This commit is contained in:
Ville Syrjälä
2025-10-13 23:12:34 +03:00
parent 5785ace8e1
commit 7a8d9cfa6d
5 changed files with 16 additions and 4 deletions

View File

@@ -865,6 +865,11 @@ static void intel_modeset_readout_hw_state(struct intel_display *display)
crtc_state->plane_min_cdclk[plane->id]);
}
crtc_state->min_cdclk = intel_crtc_min_cdclk(crtc_state);
drm_dbg_kms(display->drm, "[CRTC:%d:%s] min_cdclk %d kHz\n",
crtc->base.base.id, crtc->base.name, crtc_state->min_cdclk);
intel_pmdemand_update_port_clock(display, pmdemand_state, pipe,
crtc_state->port_clock);
}