All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 0/3] tests: Add tests for new exec flags to export two bsd rings
@ 2014-08-07  7:49 Zhipeng Gong
  2014-08-07  7:49 ` [PATCH 1/3] i-g-t: check whether kernel has dual bsd ring Zhipeng Gong
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Zhipeng Gong @ 2014-08-07  7:49 UTC (permalink / raw)
  To: intel-gfx

The Broadwell GT3 machine has two independent BSD rings that can be used
to process the video commands. New execution flags are added to export the
two rings to userspace so that userspace can specify the bsd ring.

Zhipeng Gong (3):
  i-g-t: check whether kernel has dual bsd ring
  tests/gem_exec_params: check the invalid flags for dual bsd ring
  test/gem_dummy_reloc_loop: add tests for dual bsd ring

 lib/ioctl_wrappers.c         | 16 ++++++++++++++++
 lib/ioctl_wrappers.h         |  1 +
 tests/gem_dummy_reloc_loop.c | 16 ++++++++++++++++
 tests/gem_exec_params.c      |  6 ++++++
 4 files changed, 39 insertions(+)

-- 
2.0.3

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

* [PATCH 1/3] i-g-t: check whether kernel has dual bsd ring
  2014-08-07  7:49 [PATCH i-g-t 0/3] tests: Add tests for new exec flags to export two bsd rings Zhipeng Gong
@ 2014-08-07  7:49 ` Zhipeng Gong
  2014-12-02 18:44   ` Rodrigo Vivi
  2014-08-07  7:49 ` [PATCH 2/3] tests/gem_exec_params: check the invalid flags for " Zhipeng Gong
  2014-08-07  7:49 ` [PATCH 3/3] test/gem_dummy_reloc_loop: add tests " Zhipeng Gong
  2 siblings, 1 reply; 11+ messages in thread
From: Zhipeng Gong @ 2014-08-07  7:49 UTC (permalink / raw)
  To: intel-gfx

Signed-off-by: Zhipeng Gong <zhipeng.gong@intel.com>
---
 lib/ioctl_wrappers.c | 16 ++++++++++++++++
 lib/ioctl_wrappers.h |  1 +
 2 files changed, 17 insertions(+)

diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index c4e1080..03163a0 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -754,6 +754,22 @@ bool gem_has_vebox(int fd)
 	return gem_has_enable_ring(fd,LOCAL_I915_PARAM_HAS_VEBOX);
 }
 
+#define LOCAL_I915_PARAM_HAS_BSD2 29
+/**
+ * gem_has_bsd2:
+ * @fd: open i915 drm file descriptor
+ *
+ * Feature test macro to query whether the BSD2 ring is available. This is simply
+ * a specific version of gem_has_enable_ring() for the BSD2 ring.
+ *
+ * Note that recent Bspec calls this the VCS ring for Video Command Submission.
+ *
+ * Returns: Whether the BSD ring is avaible or not.
+ */
+bool gem_has_bsd2(int fd)
+{
+	return gem_has_enable_ring(fd,I915_PARAM_HAS_BSD2);
+}
 /**
  * gem_available_aperture_size:
  * @fd: open i915 drm file descriptor
diff --git a/lib/ioctl_wrappers.h b/lib/ioctl_wrappers.h
index 310d82e..2979634 100644
--- a/lib/ioctl_wrappers.h
+++ b/lib/ioctl_wrappers.h
@@ -83,6 +83,7 @@ bool gem_has_enable_ring(int fd,int param);
 bool gem_has_bsd(int fd);
 bool gem_has_blt(int fd);
 bool gem_has_vebox(int fd);
+bool gem_has_bsd2(int fd);
 bool gem_uses_aliasing_ppgtt(int fd);
 int gem_available_fences(int fd);
 uint64_t gem_available_aperture_size(int fd);
-- 
2.0.3

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

* [PATCH 2/3] tests/gem_exec_params: check the invalid flags for dual bsd ring
  2014-08-07  7:49 [PATCH i-g-t 0/3] tests: Add tests for new exec flags to export two bsd rings Zhipeng Gong
  2014-08-07  7:49 ` [PATCH 1/3] i-g-t: check whether kernel has dual bsd ring Zhipeng Gong
@ 2014-08-07  7:49 ` Zhipeng Gong
  2014-12-02 18:45   ` Rodrigo Vivi
  2014-08-07  7:49 ` [PATCH 3/3] test/gem_dummy_reloc_loop: add tests " Zhipeng Gong
  2 siblings, 1 reply; 11+ messages in thread
From: Zhipeng Gong @ 2014-08-07  7:49 UTC (permalink / raw)
  To: intel-gfx

Signed-off-by: Zhipeng Gong <zhipeng.gong@intel.com>
---
 tests/gem_exec_params.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/gem_exec_params.c b/tests/gem_exec_params.c
index 769969d..b18ef4e 100644
--- a/tests/gem_exec_params.c
+++ b/tests/gem_exec_params.c
@@ -126,6 +126,12 @@ igt_main
 		RUN_FAIL(EINVAL);
 	}
 
+	igt_subtest("invalid-bsd-ring") {
+		igt_require(gem_has_bsd2(fd));
+		execbuf.flags = I915_EXEC_BSD | I915_EXEC_BSD_MASK;
+		RUN_FAIL(EINVAL);
+	}
+
 	igt_subtest("rel-constants-invalid-ring") {
 		igt_require(gem_has_bsd(fd));
 		execbuf.flags = I915_EXEC_BSD | I915_EXEC_CONSTANTS_ABSOLUTE;
-- 
2.0.3

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

* [PATCH 3/3] test/gem_dummy_reloc_loop: add tests for dual bsd ring
  2014-08-07  7:49 [PATCH i-g-t 0/3] tests: Add tests for new exec flags to export two bsd rings Zhipeng Gong
  2014-08-07  7:49 ` [PATCH 1/3] i-g-t: check whether kernel has dual bsd ring Zhipeng Gong
  2014-08-07  7:49 ` [PATCH 2/3] tests/gem_exec_params: check the invalid flags for " Zhipeng Gong
@ 2014-08-07  7:49 ` Zhipeng Gong
  2014-12-02 18:46   ` Rodrigo Vivi
  2 siblings, 1 reply; 11+ messages in thread
From: Zhipeng Gong @ 2014-08-07  7:49 UTC (permalink / raw)
  To: intel-gfx

Signed-off-by: Zhipeng Gong <zhipeng.gong@intel.com>
---
 tests/gem_dummy_reloc_loop.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/tests/gem_dummy_reloc_loop.c b/tests/gem_dummy_reloc_loop.c
index 4fe0786..6913537 100644
--- a/tests/gem_dummy_reloc_loop.c
+++ b/tests/gem_dummy_reloc_loop.c
@@ -265,6 +265,22 @@ igt_main
 	}
 #endif
 
+	igt_subtest("bsd-ring1") {
+		igt_require(gem_has_bsd2(fd));
+		sleep(2);
+		igt_info("running dummy loop on bsd-ring1\n");
+		dummy_reloc_loop(I915_EXEC_BSD|I915_EXEC_BSD_RING1);
+		igt_info("dummy loop run on bsd-ring1 completed\n");
+	}
+
+	igt_subtest("bsd-ring2") {
+		igt_require(gem_has_bsd2(fd));
+		sleep(2);
+		igt_info("running dummy loop on bsd-ring2\n");
+		dummy_reloc_loop(I915_EXEC_BSD|I915_EXEC_BSD_RING2);
+		igt_info("dummy loop run on bsd-ring2 completed\n");
+	}
+
 	igt_subtest("mixed") {
 		if (num_rings > 1) {
 			sleep(2);
-- 
2.0.3

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

* Re: [PATCH 1/3] i-g-t: check whether kernel has dual bsd ring
  2014-08-07  7:49 ` [PATCH 1/3] i-g-t: check whether kernel has dual bsd ring Zhipeng Gong
@ 2014-12-02 18:44   ` Rodrigo Vivi
  2014-12-03  9:11     ` Daniel Vetter
  0 siblings, 1 reply; 11+ messages in thread
From: Rodrigo Vivi @ 2014-12-02 18:44 UTC (permalink / raw)
  To: Zhipeng Gong; +Cc: intel-gfx, thomas.wood

On Thu, Aug 7, 2014 at 12:49 AM, Zhipeng Gong <zhipeng.gong@intel.com> wrote:
> Signed-off-by: Zhipeng Gong <zhipeng.gong@intel.com>
> ---
>  lib/ioctl_wrappers.c | 16 ++++++++++++++++
>  lib/ioctl_wrappers.h |  1 +
>  2 files changed, 17 insertions(+)
>
> diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
> index c4e1080..03163a0 100644
> --- a/lib/ioctl_wrappers.c
> +++ b/lib/ioctl_wrappers.c
> @@ -754,6 +754,22 @@ bool gem_has_vebox(int fd)
>         return gem_has_enable_ring(fd,LOCAL_I915_PARAM_HAS_VEBOX);
>  }
>
> +#define LOCAL_I915_PARAM_HAS_BSD2 29
> +/**
> + * gem_has_bsd2:
> + * @fd: open i915 drm file descriptor
> + *
> + * Feature test macro to query whether the BSD2 ring is available. This is simply
> + * a specific version of gem_has_enable_ring() for the BSD2 ring.
> + *
> + * Note that recent Bspec calls this the VCS ring for Video Command Submission.
> + *
> + * Returns: Whether the BSD ring is avaible or not.
> + */
> +bool gem_has_bsd2(int fd)
> +{
> +       return gem_has_enable_ring(fd,I915_PARAM_HAS_BSD2);

You add a LOCAL_ but execute without it. Compilation fails without
libdrm patches I just sent:
http://lists.freedesktop.org/archives/intel-gfx/2014-December/056568.html
http://lists.freedesktop.org/archives/intel-gfx/2014-December/056569.html

So, or use the local or remove it considering that it is on libdrm.
Thomas, how do you prefer it?

With that fixed feel free to use:
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Tested-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> +}
>  /**
>   * gem_available_aperture_size:
>   * @fd: open i915 drm file descriptor
> diff --git a/lib/ioctl_wrappers.h b/lib/ioctl_wrappers.h
> index 310d82e..2979634 100644
> --- a/lib/ioctl_wrappers.h
> +++ b/lib/ioctl_wrappers.h
> @@ -83,6 +83,7 @@ bool gem_has_enable_ring(int fd,int param);
>  bool gem_has_bsd(int fd);
>  bool gem_has_blt(int fd);
>  bool gem_has_vebox(int fd);
> +bool gem_has_bsd2(int fd);
>  bool gem_uses_aliasing_ppgtt(int fd);
>  int gem_available_fences(int fd);
>  uint64_t gem_available_aperture_size(int fd);
> --
> 2.0.3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 2/3] tests/gem_exec_params: check the invalid flags for dual bsd ring
  2014-08-07  7:49 ` [PATCH 2/3] tests/gem_exec_params: check the invalid flags for " Zhipeng Gong
@ 2014-12-02 18:45   ` Rodrigo Vivi
  0 siblings, 0 replies; 11+ messages in thread
From: Rodrigo Vivi @ 2014-12-02 18:45 UTC (permalink / raw)
  To: Zhipeng Gong; +Cc: intel-gfx

This also depends on libdrm patches or adding locals.

With that fixed also feel free to use
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Tested-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

On Thu, Aug 7, 2014 at 12:49 AM, Zhipeng Gong <zhipeng.gong@intel.com> wrote:
> Signed-off-by: Zhipeng Gong <zhipeng.gong@intel.com>
> ---
>  tests/gem_exec_params.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/tests/gem_exec_params.c b/tests/gem_exec_params.c
> index 769969d..b18ef4e 100644
> --- a/tests/gem_exec_params.c
> +++ b/tests/gem_exec_params.c
> @@ -126,6 +126,12 @@ igt_main
>                 RUN_FAIL(EINVAL);
>         }
>
> +       igt_subtest("invalid-bsd-ring") {
> +               igt_require(gem_has_bsd2(fd));
> +               execbuf.flags = I915_EXEC_BSD | I915_EXEC_BSD_MASK;
> +               RUN_FAIL(EINVAL);
> +       }
> +
>         igt_subtest("rel-constants-invalid-ring") {
>                 igt_require(gem_has_bsd(fd));
>                 execbuf.flags = I915_EXEC_BSD | I915_EXEC_CONSTANTS_ABSOLUTE;
> --
> 2.0.3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 3/3] test/gem_dummy_reloc_loop: add tests for dual bsd ring
  2014-08-07  7:49 ` [PATCH 3/3] test/gem_dummy_reloc_loop: add tests " Zhipeng Gong
@ 2014-12-02 18:46   ` Rodrigo Vivi
  0 siblings, 0 replies; 11+ messages in thread
From: Rodrigo Vivi @ 2014-12-02 18:46 UTC (permalink / raw)
  To: Zhipeng Gong; +Cc: intel-gfx

This also depends on libdrm patches or adding locals.

With that fixed also feel free to use
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Tested-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

On Thu, Aug 7, 2014 at 12:49 AM, Zhipeng Gong <zhipeng.gong@intel.com> wrote:
> Signed-off-by: Zhipeng Gong <zhipeng.gong@intel.com>
> ---
>  tests/gem_dummy_reloc_loop.c | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>
> diff --git a/tests/gem_dummy_reloc_loop.c b/tests/gem_dummy_reloc_loop.c
> index 4fe0786..6913537 100644
> --- a/tests/gem_dummy_reloc_loop.c
> +++ b/tests/gem_dummy_reloc_loop.c
> @@ -265,6 +265,22 @@ igt_main
>         }
>  #endif
>
> +       igt_subtest("bsd-ring1") {
> +               igt_require(gem_has_bsd2(fd));
> +               sleep(2);
> +               igt_info("running dummy loop on bsd-ring1\n");
> +               dummy_reloc_loop(I915_EXEC_BSD|I915_EXEC_BSD_RING1);
> +               igt_info("dummy loop run on bsd-ring1 completed\n");
> +       }
> +
> +       igt_subtest("bsd-ring2") {
> +               igt_require(gem_has_bsd2(fd));
> +               sleep(2);
> +               igt_info("running dummy loop on bsd-ring2\n");
> +               dummy_reloc_loop(I915_EXEC_BSD|I915_EXEC_BSD_RING2);
> +               igt_info("dummy loop run on bsd-ring2 completed\n");
> +       }
> +
>         igt_subtest("mixed") {
>                 if (num_rings > 1) {
>                         sleep(2);
> --
> 2.0.3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 1/3] i-g-t: check whether kernel has dual bsd ring
  2014-12-02 18:44   ` Rodrigo Vivi
@ 2014-12-03  9:11     ` Daniel Vetter
  0 siblings, 0 replies; 11+ messages in thread
From: Daniel Vetter @ 2014-12-03  9:11 UTC (permalink / raw)
  To: Rodrigo Vivi; +Cc: intel-gfx, thomas.wood

On Tue, Dec 02, 2014 at 10:44:28AM -0800, Rodrigo Vivi wrote:
> On Thu, Aug 7, 2014 at 12:49 AM, Zhipeng Gong <zhipeng.gong@intel.com> wrote:
> > Signed-off-by: Zhipeng Gong <zhipeng.gong@intel.com>
> > ---
> >  lib/ioctl_wrappers.c | 16 ++++++++++++++++
> >  lib/ioctl_wrappers.h |  1 +
> >  2 files changed, 17 insertions(+)
> >
> > diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
> > index c4e1080..03163a0 100644
> > --- a/lib/ioctl_wrappers.c
> > +++ b/lib/ioctl_wrappers.c
> > @@ -754,6 +754,22 @@ bool gem_has_vebox(int fd)
> >         return gem_has_enable_ring(fd,LOCAL_I915_PARAM_HAS_VEBOX);
> >  }
> >
> > +#define LOCAL_I915_PARAM_HAS_BSD2 29
> > +/**
> > + * gem_has_bsd2:
> > + * @fd: open i915 drm file descriptor
> > + *
> > + * Feature test macro to query whether the BSD2 ring is available. This is simply
> > + * a specific version of gem_has_enable_ring() for the BSD2 ring.
> > + *
> > + * Note that recent Bspec calls this the VCS ring for Video Command Submission.
> > + *
> > + * Returns: Whether the BSD ring is avaible or not.
> > + */
> > +bool gem_has_bsd2(int fd)
> > +{
> > +       return gem_has_enable_ring(fd,I915_PARAM_HAS_BSD2);
> 
> You add a LOCAL_ but execute without it. Compilation fails without
> libdrm patches I just sent:
> http://lists.freedesktop.org/archives/intel-gfx/2014-December/056568.html
> http://lists.freedesktop.org/archives/intel-gfx/2014-December/056569.html
> 
> So, or use the local or remove it considering that it is on libdrm.
> Thomas, how do you prefer it?

We need the LOCAL_ otherwise we have a big depency chain for merging
(since i-g-t can only depend upon stuff in released libdrm versions).

After a few libdrm releases you can clean up and remove the LOCAL_ stuff
(and bump the libdrm dep in igt ofc).
-Daniel

> 
> With that fixed feel free to use:
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Tested-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> 
> > +}
> >  /**
> >   * gem_available_aperture_size:
> >   * @fd: open i915 drm file descriptor
> > diff --git a/lib/ioctl_wrappers.h b/lib/ioctl_wrappers.h
> > index 310d82e..2979634 100644
> > --- a/lib/ioctl_wrappers.h
> > +++ b/lib/ioctl_wrappers.h
> > @@ -83,6 +83,7 @@ bool gem_has_enable_ring(int fd,int param);
> >  bool gem_has_bsd(int fd);
> >  bool gem_has_blt(int fd);
> >  bool gem_has_vebox(int fd);
> > +bool gem_has_bsd2(int fd);
> >  bool gem_uses_aliasing_ppgtt(int fd);
> >  int gem_available_fences(int fd);
> >  uint64_t gem_available_aperture_size(int fd);
> > --
> > 2.0.3
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> 
> 
> -- 
> Rodrigo Vivi
> Blog: http://blog.vivi.eng.br
> _______________________________________________
> 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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 2/3] tests/gem_exec_params: check the invalid flags for dual bsd ring
  2015-01-20 21:43   ` Rodrigo Vivi
@ 2015-01-21  1:04     ` Gong, Zhipeng
  0 siblings, 0 replies; 11+ messages in thread
From: Gong, Zhipeng @ 2015-01-21  1:04 UTC (permalink / raw)
  To: Rodrigo Vivi; +Cc: intel-gfx, Vivi, Rodrigo



> -----Original Message-----
> From: Rodrigo Vivi [mailto:rodrigo.vivi@gmail.com]
> Sent: Wednesday, January 21, 2015 5:44 AM
> To: Gong, Zhipeng
> Cc: intel-gfx; Vivi, Rodrigo
> Subject: Re: [Intel-gfx] [PATCH 2/3] tests/gem_exec_params: check the invalid
> flags for dual bsd ring
> 
> I couldn't save my GT3 here for new tests, but on GT2 it fails:
> 
> $ sudo ./gem_exec_params
> IGT-Version: 1.9-g85bc151 (x86_64) (Linux: 3.19.0-rc4+ x86_64) Subtest control:
> SUCCESS (0.000s) Test requirement not met in function __real_main58, file
> gem_exec_params.c:108:
> Test requirement: !gem_has_bsd(fd)
> Subtest no-bsd: SKIP (0.000s)
> 
> GT2 has BSD so it shouldn't skip here
no-bsd test requires that platform has no bsd ring, so it should be skipped for GT2. I don't change this test.
> 
> Test requirement not met in function __real_main58, file
> gem_exec_params.c:113:
> Test requirement: !gem_has_blt(fd)
> Subtest no-blt: SKIP (0.000s)
> 
> Same issue here!
no-blt test requires that platform has no bsd ring, so it should be skipped for GT2. I don't change this test.
> 
> Test requirement not met in function __real_main58, file
> gem_exec_params.c:118:
> Test requirement: !gem_has_vebox(fd)
> Subtest no-vebox: SKIP (0.000s)
> 
> Same issue here!
no-vebox test requires that platform has no bsd ring, so it should be skipped for GT2. I don't change this test.
> 
> Subtest invalid-ring: SUCCESS (0.000s)
> Subtest invalid-ring2: SUCCESS (0.000s)
> Test requirement not met in function __real_main58, file
> gem_exec_params.c:133:
> Test requirement: gem_has_bsd2(fd)
> Subtest invalid-bsd-ring: SKIP (0.000s)
> 
> This one should be the only SKIP in my BDW GT2.
Yes, it is skipped on GT2
> 
> Thanks,
> Rodrigo.
> 
> On Mon, Jan 12, 2015 at 4:50 PM, Zhipeng Gong <zhipeng.gong@intel.com>
> wrote:
> > v2: add more tests to address Daniel's comments(Zhipeng)
> >
> > Signed-off-by: Zhipeng Gong <zhipeng.gong@intel.com>
> > ---
> >  tests/gem_exec_params.c | 41
> > +++++++++++++++++++++++++++++++++++++++++
> >  1 file changed, 41 insertions(+)
> >
> > diff --git a/tests/gem_exec_params.c b/tests/gem_exec_params.c index
> > f63eda9..54f0dc3 100644
> > --- a/tests/gem_exec_params.c
> > +++ b/tests/gem_exec_params.c
> > @@ -45,6 +45,9 @@
> >  #include "igt_aux.h"
> >
> >  #define LOCAL_I915_EXEC_VEBOX (4<<0)
> > +#define LOCAL_I915_EXEC_BSD_MASK (3<<13) #define
> > +LOCAL_I915_EXEC_BSD_RING1 (1<<13) #define
> LOCAL_I915_EXEC_BSD_RING2
> > +(2<<13)
> >
> >  struct drm_i915_gem_execbuffer2 execbuf;  struct
> > drm_i915_gem_exec_object2 gem_exec[1]; @@ -126,6 +129,44 @@
> igt_main
> >                 RUN_FAIL(EINVAL);
> >         }
> >
> > +       igt_subtest("invalid-bsd-ring") {
> > +               igt_require(gem_has_bsd2(fd));
> > +               execbuf.flags = I915_EXEC_BSD |
> LOCAL_I915_EXEC_BSD_MASK;
> > +               RUN_FAIL(EINVAL);
> > +       }
> > +
> > +       igt_subtest("invalid-bsd1-flag-on-render") {
> > +               execbuf.flags = I915_EXEC_RENDER |
> LOCAL_I915_EXEC_BSD_RING1;
> > +               RUN_FAIL(EINVAL);
> > +       }
> > +
> > +       igt_subtest("invalid-bsd2-flag-on-render") {
> > +               execbuf.flags = I915_EXEC_RENDER |
> LOCAL_I915_EXEC_BSD_RING2;
> > +               RUN_FAIL(EINVAL);
> > +       }
> > +
> > +       igt_subtest("invalid-bsd1-flag-on-blt") {
> > +               execbuf.flags = I915_EXEC_BLT |
> LOCAL_I915_EXEC_BSD_RING1;
> > +               RUN_FAIL(EINVAL);
> > +       }
> > +
> > +       igt_subtest("invalid-bsd2-flag-on-blt") {
> > +               execbuf.flags = I915_EXEC_BLT |
> LOCAL_I915_EXEC_BSD_RING2;
> > +               RUN_FAIL(EINVAL);
> > +       }
> > +
> > +       igt_subtest("invalid-bsd1-flag-on-vebox") {
> > +               igt_require(gem_has_vebox(fd));
> > +               execbuf.flags = LOCAL_I915_EXEC_VEBOX |
> LOCAL_I915_EXEC_BSD_RING1;
> > +               RUN_FAIL(EINVAL);
> > +       }
> > +
> > +       igt_subtest("invalid-bsd2-flag-on-vebox") {
> > +               igt_require(gem_has_vebox(fd));
> > +               execbuf.flags = LOCAL_I915_EXEC_VEBOX |
> LOCAL_I915_EXEC_BSD_RING2;
> > +               RUN_FAIL(EINVAL);
> > +       }
> > +
> >         igt_subtest("rel-constants-invalid-ring") {
> >                 igt_require(gem_has_bsd(fd));
> >                 execbuf.flags = I915_EXEC_BSD |
> > I915_EXEC_CONSTANTS_ABSOLUTE;
> > --
> > 1.8.3.1
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> 
> 
> --
> Rodrigo Vivi
> Blog: http://blog.vivi.eng.br
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH 2/3] tests/gem_exec_params: check the invalid flags for dual bsd ring
  2015-01-13  0:50 ` [PATCH 2/3] tests/gem_exec_params: check the invalid flags for dual bsd ring Zhipeng Gong
@ 2015-01-20 21:43   ` Rodrigo Vivi
  2015-01-21  1:04     ` Gong, Zhipeng
  0 siblings, 1 reply; 11+ messages in thread
From: Rodrigo Vivi @ 2015-01-20 21:43 UTC (permalink / raw)
  To: Zhipeng Gong; +Cc: intel-gfx, Vivi, Rodrigo

I couldn't save my GT3 here for new tests, but on GT2 it fails:

$ sudo ./gem_exec_params
IGT-Version: 1.9-g85bc151 (x86_64) (Linux: 3.19.0-rc4+ x86_64)
Subtest control: SUCCESS (0.000s)
Test requirement not met in function __real_main58, file gem_exec_params.c:108:
Test requirement: !gem_has_bsd(fd)
Subtest no-bsd: SKIP (0.000s)

GT2 has BSD so it shouldn't skip here

Test requirement not met in function __real_main58, file gem_exec_params.c:113:
Test requirement: !gem_has_blt(fd)
Subtest no-blt: SKIP (0.000s)

Same issue here!

Test requirement not met in function __real_main58, file gem_exec_params.c:118:
Test requirement: !gem_has_vebox(fd)
Subtest no-vebox: SKIP (0.000s)

Same issue here!

Subtest invalid-ring: SUCCESS (0.000s)
Subtest invalid-ring2: SUCCESS (0.000s)
Test requirement not met in function __real_main58, file gem_exec_params.c:133:
Test requirement: gem_has_bsd2(fd)
Subtest invalid-bsd-ring: SKIP (0.000s)

This one should be the only SKIP in my BDW GT2.

Thanks,
Rodrigo.

On Mon, Jan 12, 2015 at 4:50 PM, Zhipeng Gong <zhipeng.gong@intel.com> wrote:
> v2: add more tests to address Daniel's comments(Zhipeng)
>
> Signed-off-by: Zhipeng Gong <zhipeng.gong@intel.com>
> ---
>  tests/gem_exec_params.c | 41 +++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 41 insertions(+)
>
> diff --git a/tests/gem_exec_params.c b/tests/gem_exec_params.c
> index f63eda9..54f0dc3 100644
> --- a/tests/gem_exec_params.c
> +++ b/tests/gem_exec_params.c
> @@ -45,6 +45,9 @@
>  #include "igt_aux.h"
>
>  #define LOCAL_I915_EXEC_VEBOX (4<<0)
> +#define LOCAL_I915_EXEC_BSD_MASK (3<<13)
> +#define LOCAL_I915_EXEC_BSD_RING1 (1<<13)
> +#define LOCAL_I915_EXEC_BSD_RING2 (2<<13)
>
>  struct drm_i915_gem_execbuffer2 execbuf;
>  struct drm_i915_gem_exec_object2 gem_exec[1];
> @@ -126,6 +129,44 @@ igt_main
>                 RUN_FAIL(EINVAL);
>         }
>
> +       igt_subtest("invalid-bsd-ring") {
> +               igt_require(gem_has_bsd2(fd));
> +               execbuf.flags = I915_EXEC_BSD | LOCAL_I915_EXEC_BSD_MASK;
> +               RUN_FAIL(EINVAL);
> +       }
> +
> +       igt_subtest("invalid-bsd1-flag-on-render") {
> +               execbuf.flags = I915_EXEC_RENDER | LOCAL_I915_EXEC_BSD_RING1;
> +               RUN_FAIL(EINVAL);
> +       }
> +
> +       igt_subtest("invalid-bsd2-flag-on-render") {
> +               execbuf.flags = I915_EXEC_RENDER | LOCAL_I915_EXEC_BSD_RING2;
> +               RUN_FAIL(EINVAL);
> +       }
> +
> +       igt_subtest("invalid-bsd1-flag-on-blt") {
> +               execbuf.flags = I915_EXEC_BLT | LOCAL_I915_EXEC_BSD_RING1;
> +               RUN_FAIL(EINVAL);
> +       }
> +
> +       igt_subtest("invalid-bsd2-flag-on-blt") {
> +               execbuf.flags = I915_EXEC_BLT | LOCAL_I915_EXEC_BSD_RING2;
> +               RUN_FAIL(EINVAL);
> +       }
> +
> +       igt_subtest("invalid-bsd1-flag-on-vebox") {
> +               igt_require(gem_has_vebox(fd));
> +               execbuf.flags = LOCAL_I915_EXEC_VEBOX | LOCAL_I915_EXEC_BSD_RING1;
> +               RUN_FAIL(EINVAL);
> +       }
> +
> +       igt_subtest("invalid-bsd2-flag-on-vebox") {
> +               igt_require(gem_has_vebox(fd));
> +               execbuf.flags = LOCAL_I915_EXEC_VEBOX | LOCAL_I915_EXEC_BSD_RING2;
> +               RUN_FAIL(EINVAL);
> +       }
> +
>         igt_subtest("rel-constants-invalid-ring") {
>                 igt_require(gem_has_bsd(fd));
>                 execbuf.flags = I915_EXEC_BSD | I915_EXEC_CONSTANTS_ABSOLUTE;
> --
> 1.8.3.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



-- 
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH 2/3] tests/gem_exec_params: check the invalid flags for dual bsd ring
  2015-01-13  0:50 [PATCH i-g-t 0/3] tests: Add tests for new exec flags to export two bsd rings Zhipeng Gong
@ 2015-01-13  0:50 ` Zhipeng Gong
  2015-01-20 21:43   ` Rodrigo Vivi
  0 siblings, 1 reply; 11+ messages in thread
From: Zhipeng Gong @ 2015-01-13  0:50 UTC (permalink / raw)
  To: intel-gfx; +Cc: rodrigo.vivi

v2: add more tests to address Daniel's comments(Zhipeng)

Signed-off-by: Zhipeng Gong <zhipeng.gong@intel.com>
---
 tests/gem_exec_params.c | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/tests/gem_exec_params.c b/tests/gem_exec_params.c
index f63eda9..54f0dc3 100644
--- a/tests/gem_exec_params.c
+++ b/tests/gem_exec_params.c
@@ -45,6 +45,9 @@
 #include "igt_aux.h"
 
 #define LOCAL_I915_EXEC_VEBOX (4<<0)
+#define LOCAL_I915_EXEC_BSD_MASK (3<<13)
+#define LOCAL_I915_EXEC_BSD_RING1 (1<<13)
+#define LOCAL_I915_EXEC_BSD_RING2 (2<<13)
 
 struct drm_i915_gem_execbuffer2 execbuf;
 struct drm_i915_gem_exec_object2 gem_exec[1];
@@ -126,6 +129,44 @@ igt_main
 		RUN_FAIL(EINVAL);
 	}
 
+	igt_subtest("invalid-bsd-ring") {
+		igt_require(gem_has_bsd2(fd));
+		execbuf.flags = I915_EXEC_BSD | LOCAL_I915_EXEC_BSD_MASK;
+		RUN_FAIL(EINVAL);
+	}
+
+	igt_subtest("invalid-bsd1-flag-on-render") {
+		execbuf.flags = I915_EXEC_RENDER | LOCAL_I915_EXEC_BSD_RING1;
+		RUN_FAIL(EINVAL);
+	}
+
+	igt_subtest("invalid-bsd2-flag-on-render") {
+		execbuf.flags = I915_EXEC_RENDER | LOCAL_I915_EXEC_BSD_RING2;
+		RUN_FAIL(EINVAL);
+	}
+
+	igt_subtest("invalid-bsd1-flag-on-blt") {
+		execbuf.flags = I915_EXEC_BLT | LOCAL_I915_EXEC_BSD_RING1;
+		RUN_FAIL(EINVAL);
+	}
+
+	igt_subtest("invalid-bsd2-flag-on-blt") {
+		execbuf.flags = I915_EXEC_BLT | LOCAL_I915_EXEC_BSD_RING2;
+		RUN_FAIL(EINVAL);
+	}
+
+	igt_subtest("invalid-bsd1-flag-on-vebox") {
+		igt_require(gem_has_vebox(fd));
+		execbuf.flags = LOCAL_I915_EXEC_VEBOX | LOCAL_I915_EXEC_BSD_RING1;
+		RUN_FAIL(EINVAL);
+	}
+
+	igt_subtest("invalid-bsd2-flag-on-vebox") {
+		igt_require(gem_has_vebox(fd));
+		execbuf.flags = LOCAL_I915_EXEC_VEBOX | LOCAL_I915_EXEC_BSD_RING2;
+		RUN_FAIL(EINVAL);
+	}
+
 	igt_subtest("rel-constants-invalid-ring") {
 		igt_require(gem_has_bsd(fd));
 		execbuf.flags = I915_EXEC_BSD | I915_EXEC_CONSTANTS_ABSOLUTE;
-- 
1.8.3.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2015-01-21  1:04 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-07  7:49 [PATCH i-g-t 0/3] tests: Add tests for new exec flags to export two bsd rings Zhipeng Gong
2014-08-07  7:49 ` [PATCH 1/3] i-g-t: check whether kernel has dual bsd ring Zhipeng Gong
2014-12-02 18:44   ` Rodrigo Vivi
2014-12-03  9:11     ` Daniel Vetter
2014-08-07  7:49 ` [PATCH 2/3] tests/gem_exec_params: check the invalid flags for " Zhipeng Gong
2014-12-02 18:45   ` Rodrigo Vivi
2014-08-07  7:49 ` [PATCH 3/3] test/gem_dummy_reloc_loop: add tests " Zhipeng Gong
2014-12-02 18:46   ` Rodrigo Vivi
2015-01-13  0:50 [PATCH i-g-t 0/3] tests: Add tests for new exec flags to export two bsd rings Zhipeng Gong
2015-01-13  0:50 ` [PATCH 2/3] tests/gem_exec_params: check the invalid flags for dual bsd ring Zhipeng Gong
2015-01-20 21:43   ` Rodrigo Vivi
2015-01-21  1:04     ` Gong, Zhipeng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.