Quoting Mika Kuoppala (2019-08-08 13:59:41) > Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> writes: > > > The order in which we store the engines inside default_engines() for the > > legacy ctx->engines[] has to match the legacy I915_EXEC_RING selector > > mapping in execbuf::user_map. If we present VCS2 as being the second > > instance of the video engine, legacy userspace calls that I915_EXEC_BSD2 > > and so we need to insert it into the second video slot. > > > > v2: Record the legacy mapping (hopefully we can remove this need in the > > future) > > > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111328 > > Fixes: 2edda80db3d0 ("drm/i915: Rename engines to match their user interface") > > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> > > Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx> > > Reviewed-by: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx> #v1 > > --- > > drivers/gpu/drm/i915/gem/i915_gem_context.c | 7 +-- > > .../drm/i915/gem/selftests/igt_gem_utils.c | 2 +- > > drivers/gpu/drm/i915/gt/intel_engine_types.h | 3 ++ > > drivers/gpu/drm/i915/gt/intel_engine_user.c | 52 +++++++++++++++++++ > > drivers/gpu/drm/i915/gt/intel_gt_types.h | 1 + > > drivers/gpu/drm/i915/gt/selftest_lrc.c | 2 +- > > .../gpu/drm/i915/gt/selftest_workarounds.c | 2 +- > > 7 files changed, 63 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c > > index 1c5bc21a80ff..b407baaf0014 100644 > > --- a/drivers/gpu/drm/i915/gem/i915_gem_context.c > > +++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c > > @@ -159,7 +159,7 @@ lookup_user_engine(struct i915_gem_context *ctx, > > if (!engine) > > return ERR_PTR(-EINVAL); > > > > - idx = engine->id; > > + idx = engine->legacy_idx; > > } else { > > idx = ci->engine_instance; > > } > > @@ -279,6 +279,7 @@ static void free_engines_rcu(struct rcu_head *rcu) > > > > static struct i915_gem_engines *default_engines(struct i915_gem_context *ctx) > > clone_legacy_engines It's not cloning :) > create_gt_engines Strictly it's creating the intel_context, but I felt that ctx->engines[] was more descriptive than ctx->contexts[]. Time will tell. -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx