From: Ville Syrjälä Date: Thu, 6 Mar 2025 16:34:16 +0000 (+0200) Subject: drm/i915: Simplify cdclk_disable_noatomic() X-Git-Tag: v6.15-rc1~120^2~9^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=003ec4ce424cc3421cf82ec1b6f004f9c0fcb8a3;p=thirdparty%2Flinux.git drm/i915: Simplify cdclk_disable_noatomic() Instead of hand rolling the cdclk state disabling for a pipe in noatomic() let's just recompute the whole thing from scratch. Less code we have to remember to keep in sync. Reviewed-by: Vinod Govindapillai Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20250306163420.3961-15-ville.syrjala@linux.intel.com --- diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c index 62caee4a8b649..2a8749a0213e7 100644 --- a/drivers/gpu/drm/i915/display/intel_cdclk.c +++ b/drivers/gpu/drm/i915/display/intel_cdclk.c @@ -3364,13 +3364,8 @@ void intel_cdclk_update_hw_state(struct intel_display *display) void intel_cdclk_crtc_disable_noatomic(struct intel_crtc *crtc) { struct intel_display *display = to_intel_display(crtc); - struct intel_cdclk_state *cdclk_state = - to_intel_cdclk_state(display->cdclk.obj.state); - enum pipe pipe = crtc->pipe; - cdclk_state->min_cdclk[pipe] = 0; - cdclk_state->min_voltage_level[pipe] = 0; - cdclk_state->active_pipes &= ~BIT(pipe); + intel_cdclk_update_hw_state(display); } static int intel_compute_max_dotclk(struct intel_display *display)