All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Stimson, Dale B" <dale.b.stimson@intel.com>
To: Ramalingam C <ramalingam.c@intel.com>
Cc: igt-dev@lists.freedesktop.org, andi@etezian.org
Subject: Re: [igt-dev] [RFC v2 13/43] tests/i915/gem_ctx_isolation: use the gem_engine_topology library
Date: Fri, 28 Jun 2019 15:12:03 -0700	[thread overview]
Message-ID: <20190628221203.GA9630@dbstims-dev.fm.intel.com> (raw)
In-Reply-To: <20190621100345.20019-14-ramalingam.c@intel.com>

For tests/i915/gem_ctx_isolation the changes you have made look good,
but you will also need something like the following:

----------------------------------------------------------------
diff --git a/tests/i915/gem_ctx_isolation.c b/tests/i915/gem_ctx_isolation.c
index 2001d562..d91d8952 100644
--- a/tests/i915/gem_ctx_isolation.c
+++ b/tests/i915/gem_ctx_isolation.c
@@ -812,6 +812,7 @@ static unsigned int __has_context_isolation(int fd)
 igt_main
 {
        unsigned int has_context_isolation = 0;
+       const struct intel_execution_engine2 *e;
        int fd = -1;
        uint16_t devid;
 
@@ -833,8 +834,7 @@ igt_main
                igt_skip_on(gen > LAST_KNOWN_GEN);
        }
 
-       for (const struct intel_execution_engine2 *e = intel_execution_engines2;
-            e->name; e++) {
+       __for_each_physical_engine(fd, e) {
                igt_subtest_group {
                        igt_fixture {
                                igt_require(has_context_isolation & (1 << e->class));
----------------------------------------------------------------


On 2019-06-21 15:33:15, Ramalingam C wrote:
> Date: Fri, 21 Jun 2019 15:33:15 +0530
> From: Ramalingam C <ramalingam.c@intel.com>
> To: igt-dev@lists.freedesktop.org, tvrtko.ursulin@linux.intel.com,
>  andi@etezian.org
> Subject: [igt-dev] [RFC v2 13/43] tests/i915/gem_ctx_isolation: use the
>  gem_engine_topology library
> X-Mailer: git-send-email 2.19.1
> 
> Replace the legacy for_each_engine* defines with the ones
> implemented in the gem_engine_topology library.
> 
> Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> ---
>  tests/i915/gem_ctx_isolation.c | 19 ++++++++-----------
>  1 file changed, 8 insertions(+), 11 deletions(-)
> 
> diff --git a/tests/i915/gem_ctx_isolation.c b/tests/i915/gem_ctx_isolation.c
> index 5b054c81d449..47e20403ce1f 100644
> --- a/tests/i915/gem_ctx_isolation.c
> +++ b/tests/i915/gem_ctx_isolation.c
> @@ -556,7 +556,6 @@ static void nonpriv(int fd,
>  		0x0505c0c0,
>  		0xdeadbeef
>  	};
> -	unsigned int engine = e->flags;
>  	unsigned int num_values = ARRAY_SIZE(values);
>  
>  	/* Sigh -- hsw: we need cmdparser access to our own registers! */
> @@ -574,7 +573,7 @@ static void nonpriv(int fd,
>  
>  		tmpl_regs(fd, ctx, e, tmpl, values[v]);
>  
> -		spin = igt_spin_new(fd, .ctx = ctx, .engine = engine);
> +		spin = igt_spin_new(fd, .ctx = ctx, .engine = e->flags);
>  
>  		igt_debug("%s[%d]: Setting all registers to 0x%08x\n",
>  			  __func__, v, values[v]);
> @@ -612,7 +611,6 @@ static void isolation(int fd,
>  		0xaaaaaaaa,
>  		0xdeadbeef
>  	};
> -	unsigned int engine = e->flags;
>  	unsigned int num_values =
>  		flags & (DIRTY1 | DIRTY2) ? ARRAY_SIZE(values) : 1;
>  
> @@ -625,7 +623,7 @@ static void isolation(int fd,
>  		ctx[0] = gem_context_create(fd);
>  		regs[0] = read_regs(fd, ctx[0], e, flags);
>  
> -		spin = igt_spin_new(fd, .ctx = ctx[0], .engine = engine);
> +		spin = igt_spin_new(fd, .ctx = ctx[0], .engine = e->flags);
>  
>  		if (flags & DIRTY1) {
>  			igt_debug("%s[%d]: Setting all registers of ctx 0 to 0x%08x\n",
> @@ -678,11 +676,11 @@ static void isolation(int fd,
>  #define S4 (4 << 8)
>  #define SLEEP_MASK (0xf << 8)
>  
> -static void inject_reset_context(int fd, unsigned int engine)
> +static void inject_reset_context(int fd, const struct intel_execution_engine2 *e)
>  {
>  	struct igt_spin_factory opts = {
>  		.ctx = gem_context_create(fd),
> -		.engine = engine,
> +		.engine = e->flags,
>  		.flags = IGT_SPIN_FAST,
>  	};
>  	igt_spin_t *spin;
> @@ -693,7 +691,7 @@ static void inject_reset_context(int fd, unsigned int engine)
>  	 * HW for screwing up if the context was already broken.
>  	 */
>  
> -	if (gem_can_store_dword(fd, engine))
> +	if (gem_class_can_store_dword(fd, e->class))
>  		opts.flags |= IGT_SPIN_POLL_RUN;
>  
>  	spin = __igt_spin_factory(fd, &opts);
> @@ -723,7 +721,6 @@ static void preservation(int fd,
>  		0xdeadbeef
>  	};
>  	const unsigned int num_values = ARRAY_SIZE(values);
> -	unsigned int engine = e->flags;
>  	uint32_t ctx[num_values +1 ];
>  	uint32_t regs[num_values + 1][2];
>  	igt_spin_t *spin;
> @@ -731,7 +728,7 @@ static void preservation(int fd,
>  	gem_quiescent_gpu(fd);
>  
>  	ctx[num_values] = gem_context_create(fd);
> -	spin = igt_spin_new(fd, .ctx = ctx[num_values], .engine = engine);
> +	spin = igt_spin_new(fd, .ctx = ctx[num_values], .engine = e->flags);
>  	regs[num_values][0] = read_regs(fd, ctx[num_values], e, flags);
>  	for (int v = 0; v < num_values; v++) {
>  		ctx[v] = gem_context_create(fd);
> @@ -744,7 +741,7 @@ static void preservation(int fd,
>  	igt_spin_free(fd, spin);
>  
>  	if (flags & RESET)
> -		inject_reset_context(fd, engine);
> +		inject_reset_context(fd, e);
>  
>  	switch (flags & SLEEP_MASK) {
>  	case NOSLEEP:
> @@ -771,7 +768,7 @@ static void preservation(int fd,
>  		break;
>  	}
>  
> -	spin = igt_spin_new(fd, .ctx = ctx[num_values], .engine = engine);
> +	spin = igt_spin_new(fd, .ctx = ctx[num_values], .engine = e->flags);
>  	for (int v = 0; v < num_values; v++)
>  		regs[v][1] = read_regs(fd, ctx[v], e, flags);
>  	regs[num_values][1] = read_regs(fd, ctx[num_values], e, flags);
> -- 
> 2.19.1
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-06-28 22:12 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-21 10:03 [igt-dev] [RFC v2 00/43] Upgrading the Engine discovery Ramalingam C
2019-06-21 10:03 ` [igt-dev] [RFC v2 01/43] test/i915: gem_bad_reloc: use the gem_engine_topology library Ramalingam C
2019-06-21 10:02   ` Chris Wilson
2019-06-21 10:05     ` Tvrtko Ursulin
2019-06-21 10:51       ` Chris Wilson
2019-06-21 10:03 ` [igt-dev] [RFC v2 02/43] test/i915: gem_exec_async: " Ramalingam C
2019-06-21 10:03 ` [igt-dev] [RFC v2 03/43] test/i915: gem_exec_capture: " Ramalingam C
2019-06-21 10:03 ` [igt-dev] [RFC v2 04/43] test/i915: gem_exec_params: " Ramalingam C
2019-06-21 10:03 ` [igt-dev] [RFC v2 05/43] lib/i915: Helper func for engine class to exec_flag Ramalingam C
2019-06-21 10:49   ` Tvrtko Ursulin
2019-06-21 12:52     ` Ramalingam C
2019-06-25 11:43   ` Andi Shyti
2019-06-21 10:03 ` [igt-dev] [RFC v2 06/43] test/prime_vgem: use the gem_engine_topology library Ramalingam C
2019-06-21 10:08   ` Chris Wilson
2019-06-21 10:03 ` [igt-dev] [RFC v2 07/43] tests/i915/gem_exec_reuse: " Ramalingam C
2019-06-21 10:03 ` [igt-dev] [RFC v2 08/43] tests/i915/gem_sync: " Ramalingam C
2019-06-21 10:03 ` [igt-dev] [RFC v2 09/43] tests/i915/gem_busy: " Ramalingam C
2019-06-21 10:03 ` [igt-dev] [RFC v2 10/43] tests/i915/gem_concurrent_all: " Ramalingam C
2019-06-21 10:03 ` [igt-dev] [RFC v2 11/43] tests/i915/gem_cs_prefetch: " Ramalingam C
2019-06-21 10:11   ` Chris Wilson
2019-06-21 10:03 ` [igt-dev] [RFC v2 12/43] tests/i915/gem_ctx_create: " Ramalingam C
2019-06-21 10:03 ` [igt-dev] [RFC v2 13/43] tests/i915/gem_ctx_isolation: " Ramalingam C
2019-06-28 22:12   ` Stimson, Dale B [this message]
2019-06-21 10:03 ` [igt-dev] [RFC v2 14/43] tests/i915/gem_ctx_switch: " Ramalingam C
2019-06-21 10:14   ` Chris Wilson
2019-06-21 10:03 ` [igt-dev] [RFC v2 15/43] tests/i915/gem_ctx_thrash: " Ramalingam C
2019-06-21 10:03 ` [igt-dev] [RFC v2 16/43] tests/i915/gem_eio: " Ramalingam C
2019-06-21 10:20   ` Chris Wilson
2019-06-21 10:03 ` [igt-dev] [RFC v2 17/43] tests/i915/gem_exec_await: " Ramalingam C
2019-06-21 10:03 ` [igt-dev] [RFC v2 18/43] tests/i915/gem_exec_create: " Ramalingam C
2019-06-21 10:21   ` Chris Wilson
2019-06-25 12:17     ` Andi Shyti
2019-06-21 10:03 ` [igt-dev] [RFC v2 19/43] tests/i915/gem_exec_fence: " Ramalingam C
2019-06-21 10:22   ` Chris Wilson
2019-06-21 10:03 ` [igt-dev] [RFC v2 20/43] tests/i915/gem_exec_flush: " Ramalingam C
2019-06-21 10:03 ` [igt-dev] [RFC v2 21/43] tests/i915/gem_exec_gttfill: " Ramalingam C
2019-06-21 10:03 ` [igt-dev] [RFC v2 22/43] tests/i915/gem_exec_latency: " Ramalingam C
2019-06-21 10:03 ` [igt-dev] [RFC v2 23/43] tests/i915/gem_exec_nop: " Ramalingam C
2019-06-21 10:23   ` Chris Wilson
2019-06-21 10:03 ` [igt-dev] [RFC v2 24/43] tests/i915/gem_exec_reloc: " Ramalingam C
2019-06-21 10:24   ` Chris Wilson
2019-06-21 10:03 ` [igt-dev] [RFC v2 25/43] tests/i915/gem_exec_schedule: " Ramalingam C
2019-06-21 10:25   ` Chris Wilson
2019-06-21 10:03 ` [igt-dev] [RFC v2 26/43] tests/i915/gem_exec_suspend: " Ramalingam C
2019-06-21 10:03 ` [igt-dev] [RFC v2 27/43] tests/i915/gem_exec_whisper: " Ramalingam C
2019-06-21 10:26   ` Chris Wilson
2019-06-21 10:03 ` [igt-dev] [RFC v2 28/43] tests/i915/gem_mocs_settings: " Ramalingam C
2019-06-21 10:03 ` [igt-dev] [RFC v2 29/43] tests/i915/gem_reset_stats: " Ramalingam C
2019-06-21 10:29   ` Chris Wilson
2019-06-21 10:03 ` [igt-dev] [RFC v2 30/43] tests/i915/gem_ring_sync_loop: " Ramalingam C
2019-06-21 10:03 ` [igt-dev] [RFC v2 31/43] tests/i915/gem_ringfill: " Ramalingam C
2019-06-21 10:29   ` Chris Wilson
2019-06-21 10:03 ` [igt-dev] [RFC v2 32/43] tests/i915/gem_shrink: " Ramalingam C
2019-06-21 10:30   ` Chris Wilson
2019-06-21 10:03 ` [igt-dev] [RFC v2 33/43] tests/i915/gem_spin_batch: " Ramalingam C
2019-06-21 10:03 ` [igt-dev] [RFC v2 34/43] tests/i915/gem_storedw_loop: " Ramalingam C
2019-06-21 10:03 ` [igt-dev] [RFC v2 35/43] tests/i915/gem_userptr_blits: " Ramalingam C
2019-06-21 10:32   ` Chris Wilson
2019-06-21 10:03 ` [igt-dev] [RFC v2 36/43] tests/i915/i915_hangman: " Ramalingam C
2019-06-21 10:03 ` [igt-dev] [RFC v2 37/43] tests/i915/i915_module_load: " Ramalingam C
2019-06-21 10:03 ` [igt-dev] [RFC v2 38/43] tests/kms_busy: " Ramalingam C
2019-06-21 10:35   ` Chris Wilson
2019-06-21 10:03 ` [igt-dev] [RFC v2 39/43] tests/prime_busy: " Ramalingam C
2019-06-21 10:36   ` Chris Wilson
2019-06-21 10:03 ` [igt-dev] [RFC v2 40/43] tests/amdgpu/amd_prime: " Ramalingam C
2019-06-21 10:03 ` [igt-dev] [RFC v2 41/43] tests/i915/gem_ctx_shared: " Ramalingam C
2019-06-21 10:37   ` Chris Wilson
2019-06-21 10:03 ` [igt-dev] [RFC v2 42/43] lib: replace the legacy funcs with gem_engine_topology libraries Ramalingam C
2019-06-21 10:03 ` [igt-dev] [RFC v2 43/43] lib/gem_engine_topology: rename the macros Ramalingam C
2019-06-21 10:42 ` [igt-dev] ✓ Fi.CI.BAT: success for Upgrading the Engine discovery Patchwork
2019-06-21 16:12 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2019-06-28 22:25 ` [igt-dev] ✗ Fi.CI.BAT: failure for Upgrading the Engine discovery (rev2) 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=20190628221203.GA9630@dbstims-dev.fm.intel.com \
    --to=dale.b.stimson@intel.com \
    --cc=andi@etezian.org \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=ramalingam.c@intel.com \
    /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.