igt/test/pm_rps: load GPU to force not-idle to idle transition.
diff mbox

Message ID 1449525215-4140-1-git-send-email-bob.j.paauwe@intel.com
State New
Headers show

Commit Message

Bob Paauwe Dec. 7, 2015, 9:53 p.m. UTC
When changing the sysfs GT min frequency, the kernel won't
automatcilly drop the GT frequency to idle unless the GPU
transitions from busy to idle.

Load the GPU after increasing the GT min frequency to force
a busy to idle transition. This matches the behavior when
decreasing the GT min frequency.

Signed-off-by: Bob Paauwe <bob.j.paauwe@intel.com>
---
 tests/pm_rps.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Imre Deak Dec. 9, 2015, 3:31 p.m. UTC | #1
On ma, 2015-12-07 at 13:53 -0800, Bob Paauwe wrote:
> When changing the sysfs GT min frequency, the kernel won't
> automatcilly drop the GT frequency to idle unless the GPU
> transitions from busy to idle.
> 
> Load the GPU after increasing the GT min frequency to force
> a busy to idle transition. This matches the behavior when
> decreasing the GT min frequency.
> 
> Signed-off-by: Bob Paauwe <bob.j.paauwe@intel.com>

Yep, this fixes igt/pm_rps for me on BXT:
Reviewed-by: Imre Deak <imre.deak@intel.com>

I pushed the patch to igt.

> ---
>  tests/pm_rps.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tests/pm_rps.c b/tests/pm_rps.c
> index 9d054fd..9f752f8 100644
> --- a/tests/pm_rps.c
> +++ b/tests/pm_rps.c
> @@ -388,10 +388,14 @@ static void min_max_config(void (*check)(void),
> bool load_gpu)
>  
>  	igt_debug("\nIncrease min to midpoint...\n");
>  	writeval(stuff[MIN].filp, fmid);
> +	if (load_gpu)
> +		do_load_gpu();
>  	check();
>  
>  	igt_debug("\nIncrease min to RP0...\n");
>  	writeval(stuff[MIN].filp, origfreqs[RP0]);
> +	if (load_gpu)
> +		do_load_gpu();
>  	check();
>  
>  	igt_debug("\nIncrease min above RP0 (invalid)...\n");

Patch
diff mbox

diff --git a/tests/pm_rps.c b/tests/pm_rps.c
index 9d054fd..9f752f8 100644
--- a/tests/pm_rps.c
+++ b/tests/pm_rps.c
@@ -388,10 +388,14 @@  static void min_max_config(void (*check)(void), bool load_gpu)
 
 	igt_debug("\nIncrease min to midpoint...\n");
 	writeval(stuff[MIN].filp, fmid);
+	if (load_gpu)
+		do_load_gpu();
 	check();
 
 	igt_debug("\nIncrease min to RP0...\n");
 	writeval(stuff[MIN].filp, origfreqs[RP0]);
+	if (load_gpu)
+		do_load_gpu();
 	check();
 
 	igt_debug("\nIncrease min above RP0 (invalid)...\n");