]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/i915/ips: Eliminate the cdclk_state stuff from hsw_ips_compute_config()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 13 Oct 2025 20:12:31 +0000 (23:12 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 16 Oct 2025 21:05:04 +0000 (00:05 +0300)
commit45bcbfe637786682903f52a4d1e0646a58342bbb
tree4d5fe8d03c20f1000d392b7408cd60130adbf366
parent1c67c4366955c73debb0704f6793b779ccf0db59
drm/i915/ips: Eliminate the cdclk_state stuff from hsw_ips_compute_config()

Reorganize the IPS CDCLK handling such that the computed CDCLK
frequency will always satisfy the IPS requirements. The only
exceptional case is if IPS would push the CDCLK above the platform
max, but in that case we can simply disable IPS.

To make this 100% race free we must move the enable_ips modparam
check out from the min CDCLK computation path so that there is no
chance of hsw_min_cdclk() and hsw_ips_compute_config() observing
a different enable_ips value during the same commit.

This allows us to completely remove the cdclk_state stuff
from the IPS code. We only ever have to compare the IPS min
CDCLK against the platform max CDCLK. Thus we eliminate any ordering
requirements between intel_cdclk_atomic_check() and
hsw_ips_compute_config().

Additionally we reduce the three copies of the code doing the
95% calculation into just one.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20251013201236.30084-5-ville.syrjala@linux.intel.com
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
drivers/gpu/drm/i915/display/hsw_ips.c