[Intel-gfx] [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 19:14:28 UTC 2020
Quoting Chris Wilson (2020-02-14 18:54:43)
> +static void libapi(int i915)
> +{
> + I915_DEFINE_CONTEXT_PARAM_ENGINES(engines, 0);
I915_DEFINE_CONTEXT_PARAM_ENGINES(engines, 0) = {};
or
struct i915_gem_context_param_engines engines = {};
> + 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);
Of course this says that this for_each_context_engine() loop doesn't
work anyway.
-Chris
More information about the Intel-gfx
mailing list