All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] tests/gem_exec_params: check invalid flags for Resource Streamer
Date: Tue, 19 May 2015 11:40:23 +0200	[thread overview]
Message-ID: <20150519094023.GN15256@phenom.ffwll.local> (raw)
In-Reply-To: <1432024244-13770-1-git-send-email-abdiel.janulgue@linux.intel.com>

On Tue, May 19, 2015 at 11:30:44AM +0300, Abdiel Janulgue wrote:
> Make sure resource streamer flags works only in correct ring in
> addition to checking next flag after the RS boundary fails.
> 
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
> ---
>  tests/gem_exec_params.c | 21 ++++++++++++++++++++-
>  1 file changed, 20 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/gem_exec_params.c b/tests/gem_exec_params.c
> index 54f0dc3..08ee330 100644
> --- a/tests/gem_exec_params.c
> +++ b/tests/gem_exec_params.c
> @@ -48,6 +48,7 @@
>  #define LOCAL_I915_EXEC_BSD_MASK (3<<13)
>  #define LOCAL_I915_EXEC_BSD_RING1 (1<<13)
>  #define LOCAL_I915_EXEC_BSD_RING2 (2<<13)
> +#define LOCAL_I915_EXEC_RESOURCE_STREAMER (1<<16)
>  
>  struct drm_i915_gem_execbuffer2 execbuf;
>  struct drm_i915_gem_exec_object2 gem_exec[1];
> @@ -220,7 +221,7 @@ igt_main
>  	/* HANDLE_LUT and NO_RELOC are already exercised by gem_exec_lut_handle */
>  
>  	igt_subtest("invalid-flag") {
> -		execbuf.flags = I915_EXEC_RENDER | (I915_EXEC_HANDLE_LUT << 1);
> +		execbuf.flags = I915_EXEC_RENDER | (LOCAL_I915_EXEC_RESOURCE_STREAMER << 1);
>  		RUN_FAIL(EINVAL);
>  	}
>  
> @@ -234,6 +235,24 @@ igt_main
>  		execbuf.num_cliprects = 0;
>  	}
>  
> +	igt_subtest("rs-invalid-on-bsd-ring") {
> +		igt_require(IS_HASWELL(devid) || intel_gen(devid) >= 8);
> +		execbuf.flags = I915_EXEC_BSD | LOCAL_I915_EXEC_RESOURCE_STREAMER;
> +		RUN_FAIL(EINVAL);
> +	}
> +
> +	igt_subtest("rs-invalid-on-blt-ring") {
> +		igt_require(IS_HASWELL(devid) || intel_gen(devid) >= 8);
> +		execbuf.flags = I915_EXEC_BLT | LOCAL_I915_EXEC_RESOURCE_STREAMER;
> +		RUN_FAIL(EINVAL);
> +	}
> +
> +	igt_subtest("rs-invalid-on-vebox-ring") {
> +		igt_require(IS_HASWELL(devid) || intel_gen(devid) >= 8);
> +		execbuf.flags = I915_EXEC_VEBOX | LOCAL_I915_EXEC_RESOURCE_STREAMER;
> +		RUN_FAIL(EINVAL);
> +	}

Please also add some checks to make sure we reject RS on pre-hsw on the
render ring. lgtm otherwise.

Cheers, Daniel

> +
>  #define DIRT(name) \
>  	igt_subtest(#name "-dirt") { \
>  		execbuf.flags = 0; \
> -- 
> 1.9.1
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

      reply	other threads:[~2015-05-19  9:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-19  8:30 [PATCH] tests/gem_exec_params: check invalid flags for Resource Streamer Abdiel Janulgue
2015-05-19  9:40 ` Daniel Vetter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150519094023.GN15256@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=abdiel.janulgue@linux.intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.