[igt-dev] [PATCH i-g-t] lib/i915/gem_engine_topology.c - intel_get_current_engine invalid result
Chris Wilson
chris at chris-wilson.co.uk
Fri Feb 14 18:54:43 UTC 2020
+static void libapi(int i915)
+{
+ I915_DEFINE_CONTEXT_PARAM_ENGINES(engines, 0);
+ 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),
+ };
+ const struct intel_execution_engine2 *e;
+ unsigned int count = 0;
+
+ gem_context_set_param(i915, &p);
+
+ for_each_context_engine(i915, p.ctx_id, e)
+ count++;
+ igt_assert_eq(count, 0);
+
+ ____for_each_physical_engine(i915, p.ctx_id, e)
+ count++;
+ igt_assert_eq(count, 0);
+
+ gem_context_destroy(i915, p.ctx_id);
+}
I leave find a home and correcting the whitespace to the reader.
-Chris
More information about the igt-dev
mailing list