Fix the frequency calculation by ensuring it uses the raw frequency only.
Update live_rps_power test to use the correct frequency values for logging
and comparison.

Signed-off-by: Sk Anirban <sk.anir...@intel.com>
---
 drivers/gpu/drm/i915/gt/selftest_rps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/selftest_rps.c 
b/drivers/gpu/drm/i915/gt/selftest_rps.c
index c207a4fb03bf..32a4b0aa710a 100644
--- a/drivers/gpu/drm/i915/gt/selftest_rps.c
+++ b/drivers/gpu/drm/i915/gt/selftest_rps.c
@@ -1115,7 +1115,7 @@ static u64 measure_power(struct intel_rps *rps, int *freq)
        for (i = 0; i < 5; i++)
                x[i] = __measure_power(5);
 
-       *freq = (*freq + intel_rps_read_actual_frequency(rps)) / 2;
+       *freq = (*freq + read_cagf(rps)) / 2;
 
        /* A simple triangle filter for better result stability */
        sort(x, 5, sizeof(*x), cmp_u64, NULL);
-- 
2.34.1

Reply via email to