From: Antonio Argenziano <antonio.argenziano@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 1/4] i915/gem_ctx_engines: Exercise 0 engines[]
Date: Fri, 14 Feb 2020 13:22:38 -0800 [thread overview]
Message-ID: <098b8231-8e53-7f72-cfb8-13221339e211@intel.com> (raw)
In-Reply-To: <20200214194016.4054376-1-chris@chris-wilson.co.uk>
On 14/02/20 11:40, Chris Wilson wrote:
> Setup a context with no engines, and make sure we reject all execution
> attempts.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
> ---
> tests/i915/gem_ctx_engines.c | 45 ++++++++++++++++++++++++++++++++++++
> 1 file changed, 45 insertions(+)
>
> diff --git a/tests/i915/gem_ctx_engines.c b/tests/i915/gem_ctx_engines.c
> index cb82f08ef..063140e0f 100644
> --- a/tests/i915/gem_ctx_engines.c
> +++ b/tests/i915/gem_ctx_engines.c
> @@ -242,6 +242,48 @@ static void idempotent(int i915)
> gem_context_destroy(i915, p.ctx_id);
> }
>
> +static uint32_t batch_create(int i915)
> +{
> + const uint32_t bbe = MI_BATCH_BUFFER_END;
> + uint32_t handle = gem_create(i915, 4096);
> +
> + gem_write(i915, handle, 0, &bbe, sizeof(bbe));
> + return handle;
> +}
> +
> +static void none(int i915)
> +{
> + struct i915_context_param_engines engines = {};
> + struct drm_i915_gem_context_param p = {
> + .ctx_id = gem_context_create(i915),
> + .param = I915_CONTEXT_PARAM_ENGINES,
> + .value = to_user_pointer(&engines),
> + .size = sizeof(engines),
> + };
> +
> + gem_context_set_param(i915, &p);
> +
> + {
> + struct drm_i915_gem_exec_object2 obj = {
> + .handle = batch_create(i915),
> + };
> + struct drm_i915_gem_execbuffer2 execbuf = {
> + .buffers_ptr = to_user_pointer(&obj),
> + .buffer_count = 1,
> + .rsvd1 = p.ctx_id,
> + };
> +
> + for (execbuf.flags = 0;
> + execbuf.flags <= I915_EXEC_RING_MASK;
> + execbuf.flags++)
> + igt_assert_eq(__gem_execbuf(i915, &execbuf), -EINVAL);
> +
> + gem_close(i915, obj.handle);
> + }
> +
> + gem_context_destroy(i915, p.ctx_id);
> +}
> +
> static void execute_one(int i915)
> {
> I915_DEFINE_CONTEXT_PARAM_ENGINES(engines , I915_EXEC_RING_MASK + 1);
> @@ -527,6 +569,9 @@ igt_main
> igt_subtest("idempotent")
> idempotent(i915);
>
> + igt_subtest("none")
> + none(i915);
> +
> igt_subtest("execute-one")
> execute_one(i915);
>
>
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2020-02-14 21:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-14 19:40 [igt-dev] [PATCH i-g-t 1/4] i915/gem_ctx_engines: Exercise 0 engines[] Chris Wilson
2020-02-14 19:40 ` [igt-dev] [PATCH i-g-t 2/4] i915/gem_ctx_engine: Exercise for_each_context_engine() with custom engine[] Chris Wilson
2020-02-14 21:49 ` Antonio Argenziano
2020-02-14 21:57 ` Chris Wilson
2020-02-14 19:40 ` [Intel-gfx] [PATCH i-g-t 3/4] lib/i915: Don't confuse param.size Chris Wilson
2020-02-14 23:16 ` [igt-dev] " Stimson, Dale B
2020-02-14 19:40 ` [igt-dev] [PATCH i-g-t 4/4] lib/i915/gem_engine_topology.c - intel_get_current_engine invalid result Chris Wilson
2020-02-14 20:13 ` [igt-dev] ✗ GitLab.Pipeline: failure for series starting with [i-g-t,1/4] i915/gem_ctx_engines: Exercise 0 engines[] Patchwork
2020-02-14 20:26 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2020-02-14 21:22 ` Antonio Argenziano [this message]
2020-02-18 1:16 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
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=098b8231-8e53-7f72-cfb8-13221339e211@intel.com \
--to=antonio.argenziano@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=igt-dev@lists.freedesktop.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox