diff mbox series

[v1] drm/i915/selftests: Add delay to stabilize frequency in live_rps_power

Message ID 20241202151514.2785289-1-sk.anirban@intel.com (mailing list archive)
State New
Headers show
Series [v1] drm/i915/selftests: Add delay to stabilize frequency in live_rps_power | expand

Commit Message

Anirban, Sk Dec. 2, 2024, 3:15 p.m. UTC
Add delays to allow frequency stabilization before power measurement
to fix sporadic power conservation issues in live_rps_power test.

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

Comments

Nilawar, Badal Dec. 3, 2024, 5:06 a.m. UTC | #1
On 02-12-2024 20:45, Sk Anirban wrote:
> Add delays to allow frequency stabilization before power measurement
> to fix sporadic power conservation issues in live_rps_power test.
> 
> Signed-off-by: Sk Anirban <sk.anirban@intel.com>
> ---
>   drivers/gpu/drm/i915/gt/selftest_rps.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/gt/selftest_rps.c b/drivers/gpu/drm/i915/gt/selftest_rps.c
> index dcef8d498919..3f26c5a079c7 100644
> --- a/drivers/gpu/drm/i915/gt/selftest_rps.c
> +++ b/drivers/gpu/drm/i915/gt/selftest_rps.c
> @@ -1191,9 +1191,11 @@ int live_rps_power(void *arg)
>   		}
>   
>   		max.freq = rps->max_freq;
> +		msleep(100);
>   		max.power = measure_power_at(rps, &max.freq);
>   
>   		min.freq = rps->min_freq;
> +		msleep(100);

Delay should be after rps_set_check.

static u64 measure_power_at(struct intel_rps *rps, int *freq)
{
         *freq = rps_set_check(rps, *freq);
	msleep(100);
         return measure_power(rps, freq);
}

Regards,
Badal

>   		min.power = measure_power_at(rps, &min.freq);
>   
>   		igt_spinner_end(&spin);
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/selftest_rps.c b/drivers/gpu/drm/i915/gt/selftest_rps.c
index dcef8d498919..3f26c5a079c7 100644
--- a/drivers/gpu/drm/i915/gt/selftest_rps.c
+++ b/drivers/gpu/drm/i915/gt/selftest_rps.c
@@ -1191,9 +1191,11 @@  int live_rps_power(void *arg)
 		}
 
 		max.freq = rps->max_freq;
+		msleep(100);
 		max.power = measure_power_at(rps, &max.freq);
 
 		min.freq = rps->min_freq;
+		msleep(100);
 		min.power = measure_power_at(rps, &min.freq);
 
 		igt_spinner_end(&spin);