Quoting Tvrtko Ursulin (2018-01-19 13:45:24)
> + case I915_CONTEXT_GET_ENGINE_BUSY:
> + engine = intel_engine_lookup_user(i915, args->class,
> + args->instance);
> + if (!engine) {
> + ret = -EINVAL;
> + break;
> + }
> +
> + ce = &ctx->engine[engine->id];
> + if (!READ_ONCE(ce->stats.enabled)) {
> + ret = i915_mutex_lock_interruptible(dev);
> + if (!ret)
> + break;
> +
> + if (!ce->stats.enabled) {
> + ret = intel_enable_engine_stats(engine);
* Blink.
This caught me by surprise. (Other than struct_mutex) Not too offensive,
but surprising. At the very least call out to a function to handle the
request. Where did args->class, args->instance come from? You surely
didn't extend the ioctl struct just for that?
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx