Message ID | 20210127090608.16925-1-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915/gt: Prefer local execution_mask for determing viable engines | expand |
On 27/01/2021 09:06, Chris Wilson wrote: > In gen8_emit_flush_xcs, we have to look at all the engines the request > may execute on, and emit an aux-invalidate for each. Currently, we > handle the virtual engine by looking at its engine mask, but that is > copied and refined as the request->execution_mask. If we prefer the > local mask, this is one fewer rq->engine pointer chasing we have to > eliminate later when we remove rq->engine. > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > --- > drivers/gpu/drm/i915/gt/gen8_engine_cs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c > index 07ba524da90b..cac80af7ad1c 100644 > --- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c > +++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c > @@ -277,7 +277,7 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode) > if (mode & EMIT_INVALIDATE) > cmd += 2; > if (mode & EMIT_INVALIDATE) > - aux_inv = rq->engine->mask & ~BIT(BCS0); > + aux_inv = rq->execution_mask & ~BIT(BCS0); > if (aux_inv) > cmd += 2 * hweight8(aux_inv) + 2; > > Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Regards, Tvrtko
diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c index 07ba524da90b..cac80af7ad1c 100644 --- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c +++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c @@ -277,7 +277,7 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode) if (mode & EMIT_INVALIDATE) cmd += 2; if (mode & EMIT_INVALIDATE) - aux_inv = rq->engine->mask & ~BIT(BCS0); + aux_inv = rq->execution_mask & ~BIT(BCS0); if (aux_inv) cmd += 2 * hweight8(aux_inv) + 2;
In gen8_emit_flush_xcs, we have to look at all the engines the request may execute on, and emit an aux-invalidate for each. Currently, we handle the virtual engine by looking at its engine mask, but that is copied and refined as the request->execution_mask. If we prefer the local mask, this is one fewer rq->engine pointer chasing we have to eliminate later when we remove rq->engine. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- drivers/gpu/drm/i915/gt/gen8_engine_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)