CI ONLY, PLEASE DON'T REVIEW Instead of displaying i915 cached values, query min/max freq from FW when displaying in sysfs. FIXME: "show" functions don't allow you to return error!!! Signed-off-by: Ashutosh Dixit <ashutosh.dixit@xxxxxxxxx> --- drivers/gpu/drm/i915/gt/intel_rps.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_rps.c b/drivers/gpu/drm/i915/gt/intel_rps.c index 6c34a83c24b34..12609714055d5 100644 --- a/drivers/gpu/drm/i915/gt/intel_rps.c +++ b/drivers/gpu/drm/i915/gt/intel_rps.c @@ -2162,10 +2162,15 @@ u32 intel_rps_get_max_frequency(struct intel_rps *rps) { struct intel_guc_slpc *slpc = rps_to_slpc(rps); - if (rps_uses_slpc(rps)) - return slpc->max_freq_softlimit; - else + if (rps_uses_slpc(rps)) { + u32 val; + + intel_guc_slpc_get_max_freq(slpc, &val); + + return val; + } else { return intel_gpu_freq(rps, rps->max_freq_softlimit); + } } /** @@ -2482,10 +2487,15 @@ u32 intel_rps_get_min_frequency(struct intel_rps *rps) { struct intel_guc_slpc *slpc = rps_to_slpc(rps); - if (rps_uses_slpc(rps)) - return slpc->min_freq_softlimit; - else + if (rps_uses_slpc(rps)) { + u32 val; + + intel_guc_slpc_get_min_freq(slpc, &val); + + return val; + } else { return intel_gpu_freq(rps, rps->min_freq_softlimit); + } } /** -- 2.38.0