public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] igt tests/gem_exec_params: Test for -EINVAL for invalid platform and ring when executing RS
@ 2014-05-06 21:40 Abdiel Janulgue
  2014-05-06 22:40 ` Daniel Vetter
  0 siblings, 1 reply; 3+ messages in thread
From: Abdiel Janulgue @ 2014-05-06 21:40 UTC (permalink / raw)
  To: intel-gfx

Add test that makes sure RS bit only gets executed on BDW and
on the render ring.

Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
---
 tests/gem_exec_params.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tests/gem_exec_params.c b/tests/gem_exec_params.c
index 769969d..a3f765b 100644
--- a/tests/gem_exec_params.c
+++ b/tests/gem_exec_params.c
@@ -193,6 +193,17 @@ igt_main
 		execbuf.num_cliprects = 0;
 	}
 
+	igt_subtest("rs-not-gen8") {
+                igt_require(intel_gen(devid) != 8);
+                execbuf.flags = I915_EXEC_RENDER | I915_EXEC_RESOURCE_STREAMER;
+                RUN_FAIL(EINVAL);
+        }
+
+	igt_subtest("invalid-rs-ring") {
+		execbuf.flags = I915_EXEC_RESOURCE_STREAMER;
+		RUN_FAIL(EINVAL);
+	}
+
 #define DIRT(name) \
 	igt_subtest(#name "-dirt") { \
 		execbuf.flags = 0; \
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] igt tests/gem_exec_params: Test for -EINVAL for invalid platform and ring when executing RS
  2014-05-06 21:40 [PATCH] igt tests/gem_exec_params: Test for -EINVAL for invalid platform and ring when executing RS Abdiel Janulgue
@ 2014-05-06 22:40 ` Daniel Vetter
  2014-05-06 22:42   ` Daniel Vetter
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Vetter @ 2014-05-06 22:40 UTC (permalink / raw)
  To: Abdiel Janulgue; +Cc: intel-gfx

On Wed, May 07, 2014 at 12:40:53AM +0300, Abdiel Janulgue wrote:
> Add test that makes sure RS bit only gets executed on BDW and
> on the render ring.
> 
> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
> ---
>  tests/gem_exec_params.c |   11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/tests/gem_exec_params.c b/tests/gem_exec_params.c
> index 769969d..a3f765b 100644
> --- a/tests/gem_exec_params.c
> +++ b/tests/gem_exec_params.c
> @@ -193,6 +193,17 @@ igt_main
>  		execbuf.num_cliprects = 0;
>  	}
>  
> +	igt_subtest("rs-not-gen8") {
> +                igt_require(intel_gen(devid) != 8);
> +                execbuf.flags = I915_EXEC_RENDER | I915_EXEC_RESOURCE_STREAMER;
> +                RUN_FAIL(EINVAL);
> +        }
> +
> +	igt_subtest("invalid-rs-ring") {
> +		execbuf.flags = I915_EXEC_RESOURCE_STREAMER;
> +		RUN_FAIL(EINVAL);

See Chris comment, but 0 is actually _not_ an invalid ring, but aliases
RCS. Yeah, we have a fun api. So this should actually suceed, at least on
bdw (and -EINVAL everywhere else).

So you need to explicitly test with some other ring like VCS
(I915_EXEC_BSD).
-Daniel

> +	}
> +
>  #define DIRT(name) \
>  	igt_subtest(#name "-dirt") { \
>  		execbuf.flags = 0; \
> -- 
> 1.7.9.5
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] igt tests/gem_exec_params: Test for -EINVAL for invalid platform and ring when executing RS
  2014-05-06 22:40 ` Daniel Vetter
@ 2014-05-06 22:42   ` Daniel Vetter
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2014-05-06 22:42 UTC (permalink / raw)
  To: Abdiel Janulgue; +Cc: intel-gfx

On Wed, May 07, 2014 at 12:40:13AM +0200, Daniel Vetter wrote:
> On Wed, May 07, 2014 at 12:40:53AM +0300, Abdiel Janulgue wrote:
> > Add test that makes sure RS bit only gets executed on BDW and
> > on the render ring.
> > 
> > Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
> > ---
> >  tests/gem_exec_params.c |   11 +++++++++++
> >  1 file changed, 11 insertions(+)
> > 
> > diff --git a/tests/gem_exec_params.c b/tests/gem_exec_params.c
> > index 769969d..a3f765b 100644
> > --- a/tests/gem_exec_params.c
> > +++ b/tests/gem_exec_params.c
> > @@ -193,6 +193,17 @@ igt_main
> >  		execbuf.num_cliprects = 0;
> >  	}
> >  
> > +	igt_subtest("rs-not-gen8") {
> > +                igt_require(intel_gen(devid) != 8);
> > +                execbuf.flags = I915_EXEC_RENDER | I915_EXEC_RESOURCE_STREAMER;
> > +                RUN_FAIL(EINVAL);
> > +        }
> > +
> > +	igt_subtest("invalid-rs-ring") {
> > +		execbuf.flags = I915_EXEC_RESOURCE_STREAMER;
> > +		RUN_FAIL(EINVAL);
> 
> See Chris comment, but 0 is actually _not_ an invalid ring, but aliases
> RCS. Yeah, we have a fun api. So this should actually suceed, at least on
> bdw (and -EINVAL everywhere else).
> 
> So you need to explicitly test with some other ring like VCS
> (I915_EXEC_BSD).

Also you didn't update the invalid-flag subtest ... I wonder why that
didn't fail on bdw.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-05-06 22:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-06 21:40 [PATCH] igt tests/gem_exec_params: Test for -EINVAL for invalid platform and ring when executing RS Abdiel Janulgue
2014-05-06 22:40 ` Daniel Vetter
2014-05-06 22:42   ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox