summaryrefslogtreecommitdiff
path: root/lib/intel_ctx.h
diff options
context:
space:
mode:
authorJason Ekstrand <jason@jlekstrand.net>2021-04-19 18:37:18 -0500
committerJason Ekstrand <jason@jlekstrand.net>2021-07-08 12:45:33 -0500
commitceab928d971534b2cfa8397bbd6504b808b19316 (patch)
treee606d595d3a6975122b819a80069017d4c673091 /lib/intel_ctx.h
parentdbe968d941f34241daecc881ea7ea7bafc59e68e (diff)
lib/intel_ctx: Add load balancing support (v2)
We use the same convention as the load balancing tests and, when balancing is requested, we make a context with N+1 engines where the first one is the balanced engine and the others are physical engines. v2 (Zbigniew Kempczyński): - Don't initialize num_logical_engines - Use igt_assert() instead of assert() Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'lib/intel_ctx.h')
-rw-r--r--lib/intel_ctx.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/intel_ctx.h b/lib/intel_ctx.h
index e34cefc1..d4cb435a 100644
--- a/lib/intel_ctx.h
+++ b/lib/intel_ctx.h
@@ -17,6 +17,7 @@
* @flags: Context create flags
* @vm: VM to inherit or 0 for using a per-context VM
* @nopersist: set I915_CONTEXT_PARAM_PERSISTENCE to 0
+ * @load_balance: True if the first engine should be a load balancing engine
* @num_engines: Number of client-specified engines or 0 for legacy mode
* @engines: Client-specified engines
*
@@ -44,6 +45,7 @@ typedef struct intel_ctx_cfg {
uint32_t flags;
uint32_t vm;
bool nopersist;
+ bool load_balance;
unsigned int num_engines;
struct i915_engine_class_instance engines[GEM_MAX_ENGINES];
} intel_ctx_cfg_t;