Skip to content

Commit e45b819

Browse files
committed
sem/i915: Simplify intel_cdclk_update_hw_state()
intel_crtc_calculate_min_cdclk() can't return an error (since commit 5ac860c ("drm/i915: Fix DBUF bandwidth vs. cdclk handling")) so there is no point in checking for one. Also we can just call it unconditionally since it itself checks crtc_state->hw.enabled. We are currently checking crtc_state->hw.active in the readout path, but active==enabled during readout, and arguably enabled is the more correct thing to check anyway. Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250306163420.3961-14-ville.syrjala@linux.intel.com
1 parent ff79a13 commit e45b819

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3352,17 +3352,11 @@ void intel_cdclk_update_hw_state(struct intel_display *display)
33523352
const struct intel_crtc_state *crtc_state =
33533353
to_intel_crtc_state(crtc->base.state);
33543354
enum pipe pipe = crtc->pipe;
3355-
int min_cdclk = 0;
33563355

3357-
if (crtc_state->hw.active) {
3356+
if (crtc_state->hw.active)
33583357
cdclk_state->active_pipes |= BIT(pipe);
33593358

3360-
min_cdclk = intel_crtc_compute_min_cdclk(crtc_state);
3361-
if (drm_WARN_ON(display->drm, min_cdclk < 0))
3362-
min_cdclk = 0;
3363-
}
3364-
3365-
cdclk_state->min_cdclk[pipe] = min_cdclk;
3359+
cdclk_state->min_cdclk[pipe] = intel_crtc_compute_min_cdclk(crtc_state);
33663360
cdclk_state->min_voltage_level[pipe] = crtc_state->min_voltage_level;
33673361
}
33683362
}

0 commit comments

Comments
 (0)