From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Intel-gfx@lists.freedesktop.org,
Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Subject: [igt-dev] [PATCH i-g-t 20/21] gem_wsim: Allow RCS virtual engine with SSEU control
Date: Wed, 8 May 2019 13:10:57 +0100 [thread overview]
Message-ID: <20190508121058.27038-21-tvrtko.ursulin@linux.intel.com> (raw)
In-Reply-To: <20190508121058.27038-1-tvrtko.ursulin@linux.intel.com>
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
To allow exercising the SSEU configuration in combination with Virtual
Engine, allow RCS to be specified in the engine map and use appropriate
index based addressing when applying SSEU configuration to it.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
benchmarks/gem_wsim.c | 51 ++++++++++++++++++++++++++++++-------------
1 file changed, 36 insertions(+), 15 deletions(-)
diff --git a/benchmarks/gem_wsim.c b/benchmarks/gem_wsim.c
index ed5acee02e20..7990ab41f6fa 100644
--- a/benchmarks/gem_wsim.c
+++ b/benchmarks/gem_wsim.c
@@ -381,7 +381,7 @@ static int parse_engine_map(struct w_step *step, const char *_str)
if ((int)engine < 0)
return -1;
- if (engine != VCS1 && engine != VCS2)
+ if (engine != VCS1 && engine != VCS2 && engine != RCS)
return -1; /* TODO */
step->engine_map_count++;
@@ -1097,7 +1097,7 @@ static void __ctx_set_prio(uint32_t ctx_id, unsigned int prio)
}
static uint64_t
-set_ctx_sseu(uint32_t ctx, uint64_t slice_mask)
+set_ctx_sseu(struct ctx *ctx, uint64_t slice_mask)
{
struct drm_i915_gem_context_param_sseu sseu = device_sseu;
struct drm_i915_gem_context_param param = { };
@@ -1105,10 +1105,17 @@ set_ctx_sseu(uint32_t ctx, uint64_t slice_mask)
if (slice_mask == -1)
slice_mask = device_sseu.slice_mask;
+ if (ctx->engine_map && ctx->wants_balance) {
+ sseu.flags = I915_CONTEXT_SSEU_FLAG_ENGINE_INDEX;
+ sseu.engine.engine_class = I915_ENGINE_CLASS_INVALID;
+ sseu.engine.engine_instance = 0;
+ }
+
sseu.slice_mask = slice_mask;
- param.ctx_id = ctx;
+ param.ctx_id = ctx->id;
param.param = I915_CONTEXT_PARAM_SSEU;
+ param.size = sizeof(sseu);
param.value = (uintptr_t)&sseu;
gem_context_set_param(fd, ¶m);
@@ -1377,10 +1384,17 @@ prepare_workload(unsigned int id, struct workload *wrk, unsigned int flags)
ctx->engine_map_count;
for (j = 0; j < ctx->engine_map_count; j++) {
- load_balance.engines[j].engine_class =
- I915_ENGINE_CLASS_VIDEO; /* FIXME */
- load_balance.engines[j].engine_instance =
- ctx->engine_map[j] - VCS1; /* FIXME */
+ if (ctx->engine_map[j] == RCS) {
+ load_balance.engines[j].engine_class =
+ I915_ENGINE_CLASS_RENDER;
+ load_balance.engines[j].engine_instance =
+ 0; /* FIXME */
+ } else {
+ load_balance.engines[j].engine_class =
+ I915_ENGINE_CLASS_VIDEO; /* FIXME */
+ load_balance.engines[j].engine_instance =
+ ctx->engine_map[j] - VCS1; /* FIXME */
+ }
}
} else {
set_engines.extensions = 0;
@@ -1393,10 +1407,16 @@ prepare_workload(unsigned int id, struct workload *wrk, unsigned int flags)
I915_ENGINE_CLASS_INVALID_NONE;
for (j = 1; j <= ctx->engine_map_count; j++) {
- set_engines.engines[j].engine_class =
- I915_ENGINE_CLASS_VIDEO; /* FIXME */
- set_engines.engines[j].engine_instance =
- ctx->engine_map[j - 1] - VCS1; /* FIXME */
+ if (ctx->engine_map[j - 1] == RCS) {
+ set_engines.engines[j].engine_class =
+ I915_ENGINE_CLASS_RENDER;
+ set_engines.engines[j].engine_instance = 0; /* FIXME */
+ } else {
+ set_engines.engines[j].engine_class =
+ I915_ENGINE_CLASS_VIDEO; /* FIXME */
+ set_engines.engines[j].engine_instance =
+ ctx->engine_map[j - 1] - VCS1; /* FIXME */
+ }
}
for (j = 0; j < ctx->bond_count; j++) {
@@ -1467,7 +1487,7 @@ prepare_workload(unsigned int id, struct workload *wrk, unsigned int flags)
if (wrk->sseu) {
/* Set to slice 0 only, one slice. */
- ctx->sseu = set_ctx_sseu(ctx_id, 1);
+ ctx->sseu = set_ctx_sseu(ctx, 1);
}
}
@@ -2438,9 +2458,9 @@ static void *run_workload(void *data)
w->type == BOND) {
continue;
} else if (w->type == SSEU) {
- if (w->sseu != wrk->ctx_list[w->context].sseu) {
- wrk->ctx_list[w->context].sseu =
- set_ctx_sseu(wrk->ctx_list[w->context].id,
+ if (w->sseu != wrk->ctx_list[w->context * 2].sseu) {
+ wrk->ctx_list[w->context * 2].sseu =
+ set_ctx_sseu(&wrk->ctx_list[w->context * 2],
w->sseu);
}
continue;
@@ -2766,6 +2786,7 @@ static void get_device_sseu(void)
param.param = I915_CONTEXT_PARAM_SSEU;
param.value = (uintptr_t)&device_sseu;
+ param.size = sizeof(device_sseu);
gem_context_get_param(fd, ¶m);
}
--
2.19.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-05-08 12:10 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-08 12:10 [igt-dev] [PATCH i-g-t 00/21] Media scalability tooling Tvrtko Ursulin
2019-05-08 12:10 ` [igt-dev] [PATCH i-g-t 01/21] scripts/trace.pl: Fix after intel_engine_notify removal Tvrtko Ursulin
2019-05-08 12:17 ` Chris Wilson
2019-05-09 9:27 ` [Intel-gfx] " Tvrtko Ursulin
2019-05-10 12:33 ` Chris Wilson
2019-05-13 12:16 ` Tvrtko Ursulin
2019-05-08 12:10 ` [igt-dev] [PATCH i-g-t 02/21] headers: bump Tvrtko Ursulin
2019-05-08 12:10 ` [igt-dev] [PATCH i-g-t 03/21] trace.pl: Virtual engine support Tvrtko Ursulin
2019-05-10 12:52 ` Chris Wilson
2019-05-13 12:30 ` Tvrtko Ursulin
2019-05-08 12:10 ` [igt-dev] [PATCH i-g-t 04/21] trace.pl: Virtual engine preemption support Tvrtko Ursulin
2019-05-10 12:55 ` [igt-dev] [Intel-gfx] " Chris Wilson
2019-05-13 12:38 ` Tvrtko Ursulin
2019-05-08 12:10 ` [Intel-gfx] [PATCH i-g-t 05/21] wsim/media-bench: i915 balancing Tvrtko Ursulin
2019-05-10 13:14 ` [igt-dev] " Chris Wilson
2019-05-13 12:41 ` Tvrtko Ursulin
2019-05-13 12:54 ` Chris Wilson
2019-05-10 13:23 ` [Intel-gfx] " Chris Wilson
2019-05-08 12:10 ` [igt-dev] [PATCH i-g-t 06/21] gem_wsim: Use IGT uapi headers Tvrtko Ursulin
2019-05-10 13:15 ` Chris Wilson
2019-05-08 12:10 ` [igt-dev] [PATCH i-g-t 07/21] gem_wsim: Factor out common error handling Tvrtko Ursulin
2019-05-10 13:15 ` Chris Wilson
2019-05-08 12:10 ` [igt-dev] [PATCH i-g-t 08/21] gem_wsim: More wsim_err Tvrtko Ursulin
2019-05-10 13:16 ` [Intel-gfx] " Chris Wilson
2019-05-08 12:10 ` [Intel-gfx] [PATCH i-g-t 09/21] gem_wsim: Submit fence support Tvrtko Ursulin
2019-05-10 13:18 ` [igt-dev] " Chris Wilson
2019-05-08 12:10 ` [Intel-gfx] [PATCH i-g-t 10/21] gem_wsim: Extract str to engine lookup Tvrtko Ursulin
2019-05-10 13:20 ` [igt-dev] " Chris Wilson
2019-05-13 13:08 ` Tvrtko Ursulin
2019-05-08 12:10 ` [Intel-gfx] [PATCH i-g-t 11/21] gem_wsim: Engine map support Tvrtko Ursulin
2019-05-10 13:26 ` [igt-dev] " Chris Wilson
2019-05-13 13:18 ` Tvrtko Ursulin
2019-05-13 13:29 ` Chris Wilson
2019-05-13 13:40 ` Tvrtko Ursulin
2019-05-08 12:10 ` [igt-dev] [PATCH i-g-t 12/21] gem_wsim: Save some lines by changing to implicit NULL checking Tvrtko Ursulin
2019-05-10 13:28 ` Chris Wilson
2019-05-08 12:10 ` [Intel-gfx] [PATCH i-g-t 13/21] gem_wsim: Compact int command parsing with a macro Tvrtko Ursulin
2019-05-10 13:29 ` [igt-dev] " Chris Wilson
2019-05-13 13:24 ` Tvrtko Ursulin
2019-05-08 12:10 ` [igt-dev] [PATCH i-g-t 14/21] gem_wsim: Engine map load balance command Tvrtko Ursulin
2019-05-10 13:31 ` Chris Wilson
2019-05-15 11:44 ` Tvrtko Ursulin
2019-05-15 11:48 ` Chris Wilson
2019-05-15 11:55 ` Tvrtko Ursulin
2019-05-08 12:10 ` [Intel-gfx] [PATCH i-g-t 15/21] gem_wsim: Engine bond command Tvrtko Ursulin
2019-05-10 13:36 ` [igt-dev] " Chris Wilson
2019-05-13 13:28 ` Tvrtko Ursulin
2019-05-08 12:10 ` [igt-dev] [PATCH i-g-t 16/21] gem_wsim: Some more example workloads Tvrtko Ursulin
2019-05-08 12:27 ` Chris Wilson
2019-05-08 13:50 ` Tvrtko Ursulin
2019-05-08 13:56 ` Chris Wilson
2019-05-08 14:16 ` Tvrtko Ursulin
2019-05-10 13:37 ` Chris Wilson
2019-05-08 12:10 ` [igt-dev] [PATCH i-g-t 17/21] gem_wsim: Infinite batch support Tvrtko Ursulin
2019-05-10 13:48 ` Chris Wilson
2019-05-13 13:59 ` Tvrtko Ursulin
2019-05-13 14:11 ` Chris Wilson
2019-05-08 12:10 ` [igt-dev] [PATCH i-g-t 18/21] gem_wsim: Command line switch for specifying low slice count workloads Tvrtko Ursulin
2019-05-08 12:10 ` [igt-dev] [PATCH i-g-t 19/21] gem_wsim: Per context SSEU control Tvrtko Ursulin
2019-05-14 21:53 ` Chris Wilson
2019-05-08 12:10 ` Tvrtko Ursulin [this message]
2019-05-08 12:10 ` [igt-dev] [PATCH i-g-t 21/21] tests/i915_query: Engine discovery tests Tvrtko Ursulin
2019-05-08 12:53 ` [igt-dev] ✓ Fi.CI.BAT: success for Media scalability tooling (rev2) Patchwork
2019-05-08 16:01 ` [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=20190508121058.27038-21-tvrtko.ursulin@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=igt-dev@lists.freedesktop.org \
--cc=tvrtko.ursulin@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox