Re: [Intel-gfx] [PATCH v2] drm/i915/gem: Take a copy of the engines for context_barrier_task

2020-03-11 Thread Chris Wilson
Quoting Chris Wilson (2020-03-11 12:59:03) > +static inline struct i915_gem_engines * > +__context_engines_await(const struct i915_gem_context *ctx) > +{ > + struct i915_gem_engines *engines; > + > + rcu_read_lock(); > + do { > + engines =

[Intel-gfx] [PATCH v2] drm/i915/gem: Take a copy of the engines for context_barrier_task

2020-03-11 Thread Chris Wilson
When applying the context-barrier, we only care about the current engines, as the next set of engines will be naturally after the barrier. So we can skip holding the ctx->engines_mutex while constructing the request by taking a sneaky reference to the i915_gem_engines instead. Signed-off-by: