diff mbox

[igt] igt/gem_mocs_settings: Wait for RC6 EI before polling

Message ID 20180309104240.6958-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Wilson March 9, 2018, 10:42 a.m. UTC
On bxt, we see that the rc6 subtest flip-flops as RC6 does not restart
within our desired interval. Improve the likelihood of the inspection
passing by idling the GPU and waiting for 2 Evaluation Intervals before
we start polling of RC6 residency.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/gem_mocs_settings.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Michał Winiarski March 9, 2018, 3:07 p.m. UTC | #1
On Fri, Mar 09, 2018 at 10:42:40AM +0000, Chris Wilson wrote:
> On bxt, we see that the rc6 subtest flip-flops as RC6 does not restart
> within our desired interval. Improve the likelihood of the inspection
> passing by idling the GPU and waiting for 2 Evaluation Intervals before
> we start polling of RC6 residency.

I'd stick with pure gem_quiescent_gpu() since we're already polling for waay
longer than that.

Either way:

Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>

-Michał

> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  tests/gem_mocs_settings.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/gem_mocs_settings.c b/tests/gem_mocs_settings.c
> index 9705fbfd..85fd637a 100644
> --- a/tests/gem_mocs_settings.c
> +++ b/tests/gem_mocs_settings.c
> @@ -336,12 +336,15 @@ static uint32_t rc6_residency(int dir)
>  
>  static void rc6_wait(int fd)
>  {
> -	int sysfs;
>  	uint32_t residency;
> +	int sysfs;
>  
>  	sysfs = igt_sysfs_open(fd, NULL);
>  	igt_assert_lte(0, sysfs);
>  
> +	gem_quiescent_gpu(fd);
> +	usleep(320e3); /* Wait for 2 EIs before polling; should now be active */
> +
>  	residency = rc6_residency(sysfs);
>  	igt_require(igt_wait(rc6_residency(sysfs) != residency, 10000, 2));
>  
> -- 
> 2.16.2
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
diff mbox

Patch

diff --git a/tests/gem_mocs_settings.c b/tests/gem_mocs_settings.c
index 9705fbfd..85fd637a 100644
--- a/tests/gem_mocs_settings.c
+++ b/tests/gem_mocs_settings.c
@@ -336,12 +336,15 @@  static uint32_t rc6_residency(int dir)
 
 static void rc6_wait(int fd)
 {
-	int sysfs;
 	uint32_t residency;
+	int sysfs;
 
 	sysfs = igt_sysfs_open(fd, NULL);
 	igt_assert_lte(0, sysfs);
 
+	gem_quiescent_gpu(fd);
+	usleep(320e3); /* Wait for 2 EIs before polling; should now be active */
+
 	residency = rc6_residency(sysfs);
 	igt_require(igt_wait(rc6_residency(sysfs) != residency, 10000, 2));