igt/pm_rps: current freq < user specified min is not a fail (v3)

Submitted by Bob Paauwe on Dec. 4, 2015, 12:28 a.m.

Details

Message ID 1449188880-19856-1-git-send-email-bob.j.paauwe@intel.com
State Accepted
Headers show
Series "Series without cover letter" ( rev: 3 2 ) in Intel GFX

Browsing this patch as part of:
"Series without cover letter" rev 2 in Intel GFX
<< prev patch [2/2] next patch >>

Commit Message

Bob Paauwe Dec. 4, 2015, 12:28 a.m.
Since commit

  commit aed242ff7ebb697e4dff912bd4dc7ec7192f7581
  Author: Chris Wilson <chris@chris-wilson.co.uk>
  Date:   Wed Mar 18 09:48:21 2015 +0000

      drm/i915: Relax RPS contraints to allows setting minfreq on idle

it is now possible that the current frequency will drop be the user
specified minimum frequency to the "idle" or RPn frequency. Update the
 pm_rps tests to reflect that droping below the user specified minimum
is no longer considered a failure.

v2: Add check RPn <= current freq. (Me)
v3: Use RPn instead of MIN frequency in idle check (Imre)
Signed-off-by: Bob Paauwe <bob.j.paauwe@intel.com>
---
 tests/pm_rps.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Patch hide | download patch | download mbox

diff --git a/tests/pm_rps.c b/tests/pm_rps.c
index 74f08f4..9d054fd 100644
--- a/tests/pm_rps.c
+++ b/tests/pm_rps.c
@@ -146,7 +146,7 @@  static void checkit(const int *freqs)
 {
 	igt_assert_lte(freqs[MIN], freqs[MAX]);
 	igt_assert_lte(freqs[CUR], freqs[MAX]);
-	igt_assert_lte(freqs[MIN], freqs[CUR]);
+	igt_assert_lte(freqs[RPn], freqs[CUR]);
 	igt_assert_lte(freqs[RPn], freqs[MIN]);
 	igt_assert_lte(freqs[MAX], freqs[RP0]);
 	igt_assert_lte(freqs[RP1], freqs[RP0]);
@@ -472,14 +472,14 @@  static void idle_check(void)
 		read_freqs(freqs);
 		dump(freqs);
 		checkit(freqs);
-		if (freqs[CUR] == freqs[MIN])
+		if (freqs[CUR] == freqs[RPn])
 			break;
 		usleep(1000 * IDLE_WAIT_TIMESTEP_MSEC);
 		wait += IDLE_WAIT_TIMESTEP_MSEC;
 	} while (wait < IDLE_WAIT_TIMEOUT_MSEC);
 
-	igt_assert_eq(freqs[CUR], freqs[MIN]);
-	igt_debug("Required %d msec to reach cur=min\n", wait);
+	igt_assert_eq(freqs[CUR], freqs[RPn]);
+	igt_debug("Required %d msec to reach cur=idle\n", wait);
 }
 
 #define LOADED_WAIT_TIMESTEP_MSEC 100

Comments

On to, 2015-12-03 at 16:28 -0800, Bob Paauwe wrote:
> Since commit
> 
>   commit aed242ff7ebb697e4dff912bd4dc7ec7192f7581
>   Author: Chris Wilson <chris@chris-wilson.co.uk>
>   Date:   Wed Mar 18 09:48:21 2015 +0000
> 
>       drm/i915: Relax RPS contraints to allows setting minfreq on
> idle
> 
> it is now possible that the current frequency will drop be the user
> specified minimum frequency to the "idle" or RPn frequency. Update
> the
>  pm_rps tests to reflect that droping below the user specified
> minimum
> is no longer considered a failure.
> 
> v2: Add check RPn <= current freq. (Me)
> v3: Use RPn instead of MIN frequency in idle check (Imre)
> Signed-off-by: Bob Paauwe <bob.j.paauwe@intel.com>

Thanks, looks ok to me:
Reviewed-by: Imre Deak <imre.deak@intel.com>

I can also push this to IGT.

> ---
>  tests/pm_rps.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/pm_rps.c b/tests/pm_rps.c
> index 74f08f4..9d054fd 100644
> --- a/tests/pm_rps.c
> +++ b/tests/pm_rps.c
> @@ -146,7 +146,7 @@ static void checkit(const int *freqs)
>  {
>  	igt_assert_lte(freqs[MIN], freqs[MAX]);
>  	igt_assert_lte(freqs[CUR], freqs[MAX]);
> -	igt_assert_lte(freqs[MIN], freqs[CUR]);
> +	igt_assert_lte(freqs[RPn], freqs[CUR]);
>  	igt_assert_lte(freqs[RPn], freqs[MIN]);
>  	igt_assert_lte(freqs[MAX], freqs[RP0]);
>  	igt_assert_lte(freqs[RP1], freqs[RP0]);
> @@ -472,14 +472,14 @@ static void idle_check(void)
>  		read_freqs(freqs);
>  		dump(freqs);
>  		checkit(freqs);
> -		if (freqs[CUR] == freqs[MIN])
> +		if (freqs[CUR] == freqs[RPn])
>  			break;
>  		usleep(1000 * IDLE_WAIT_TIMESTEP_MSEC);
>  		wait += IDLE_WAIT_TIMESTEP_MSEC;
>  	} while (wait < IDLE_WAIT_TIMEOUT_MSEC);
>  
> -	igt_assert_eq(freqs[CUR], freqs[MIN]);
> -	igt_debug("Required %d msec to reach cur=min\n", wait);
> +	igt_assert_eq(freqs[CUR], freqs[RPn]);
> +	igt_debug("Required %d msec to reach cur=idle\n", wait);
>  }
>  
>  #define LOADED_WAIT_TIMESTEP_MSEC 100