Message ID | 20250113095912.356147-2-sk.anirban@intel.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | drm/i915/selftests: Correct frequency handling in RPS power measurement | expand |
On 13-01-2025 15:29, Sk Anirban wrote: > 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.anirban@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; Reviewed-by: Badal Nilawar <badal.nilawar@intel.com> Regards, Badal > > /* A simple triangle filter for better result stability */ > sort(x, 5, sizeof(*x), cmp_u64, NULL);
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);
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.anirban@intel.com> --- drivers/gpu/drm/i915/gt/selftest_rps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)