From: Tom O'Rourke <Tom.O'Rourke@xxxxxxxxx> Update sysfs and debugfs functions to set SLPC parameters when setting max/min frequency. Signed-off-by: Tom O'Rourke <Tom.O'Rourke@xxxxxxxxx> --- drivers/gpu/drm/i915/i915_debugfs.c | 6 ++++++ drivers/gpu/drm/i915/i915_sysfs.c | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index b705aff..c26260e 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -5118,6 +5118,9 @@ i915_max_freq_set(void *data, u64 val) } dev_priv->rps.max_freq_softlimit = val; + if (HAS_SLPC(dev)) + intel_slpc_set_param(dev, SLPC_PARAM_GLOBAL_MAX_GT_FREQ_MHZ, + (u32) intel_gpu_freq(dev_priv, val)); intel_set_rps(dev, val); @@ -5185,6 +5188,9 @@ i915_min_freq_set(void *data, u64 val) } dev_priv->rps.min_freq_softlimit = val; + if (HAS_SLPC(dev)) + intel_slpc_set_param(dev, SLPC_PARAM_GLOBAL_MIN_GT_FREQ_MHZ, + (u32) intel_gpu_freq(dev_priv, val)); intel_set_rps(dev, val); diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c index f69b949..ed72c74 100644 --- a/drivers/gpu/drm/i915/i915_sysfs.c +++ b/drivers/gpu/drm/i915/i915_sysfs.c @@ -389,6 +389,10 @@ static ssize_t gt_max_freq_mhz_store(struct device *kdev, dev_priv->rps.max_freq_softlimit = val; + if (HAS_SLPC(dev)) + intel_slpc_set_param(dev, SLPC_PARAM_GLOBAL_MAX_GT_FREQ_MHZ, + (u32) intel_gpu_freq(dev_priv, val)); + val = clamp_t(int, dev_priv->rps.cur_freq, dev_priv->rps.min_freq_softlimit, dev_priv->rps.max_freq_softlimit); @@ -448,6 +452,10 @@ static ssize_t gt_min_freq_mhz_store(struct device *kdev, dev_priv->rps.min_freq_softlimit = val; + if (HAS_SLPC(dev)) + intel_slpc_set_param(dev, SLPC_PARAM_GLOBAL_MIN_GT_FREQ_MHZ, + (u32) intel_gpu_freq(dev_priv, val)); + val = clamp_t(int, dev_priv->rps.cur_freq, dev_priv->rps.min_freq_softlimit, dev_priv->rps.max_freq_softlimit); -- 1.9.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx