summaryrefslogtreecommitdiff
path: root/tests/i915/gem_exec_schedule.c
diff options
context:
space:
mode:
authorJason Ekstrand <jason@jlekstrand.net>2021-04-15 14:06:27 -0500
committerJason Ekstrand <jason@jlekstrand.net>2021-07-08 12:45:33 -0500
commit3eae7848c89161d1cc66c88c90bc558e56df691b (patch)
tree5024130f0872641896a5027a36810bd8f79267f2 /tests/i915/gem_exec_schedule.c
parentd1cff0549a825d8bfe9b42ce3108dfb246528b3e (diff)
lib/i915: Rework engine API availability checks (v4)
Instead of relying on the context param, check for the device query or attempt to set engines as a create param. v2 (Jason Ekstrand): - Add a common gem_has_context_engines helper v3 (Jason Ekstrand): - Drop gem_has_context_engines and always check I915_QUERY_ENGINE_INFO v4 (Ashutosh Dixit): - Add a comment to the gem_has_engine_topology docs saying that it can be used to query either feature. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'tests/i915/gem_exec_schedule.c')
-rw-r--r--tests/i915/gem_exec_schedule.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c
index 3a51b51d..a75faeb6 100644
--- a/tests/i915/gem_exec_schedule.c
+++ b/tests/i915/gem_exec_schedule.c
@@ -1665,15 +1665,6 @@ static void preempt_queue(int fd, const intel_ctx_cfg_t *cfg,
}
}
-static bool has_context_engines(int i915)
-{
- struct drm_i915_gem_context_param param = {
- .ctx_id = 0,
- .param = I915_CONTEXT_PARAM_ENGINES,
- };
- return __gem_context_set_param(i915, &param) == 0;
-}
-
static void preempt_engines(int i915,
const struct intel_execution_engine2 *e,
unsigned int flags)
@@ -1694,7 +1685,7 @@ static void preempt_engines(int i915,
* timeline that we can reprioritise and shuffle amongst themselves.
*/
- igt_require(has_context_engines(i915));
+ igt_require(gem_has_engine_topology(i915));
for (int n = 0; n < GEM_MAX_ENGINES; n++) {
cfg.engines[n].engine_class = e->class;