From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 34/40] drm/i915: Rename intel_context.active to .inflight
Date: Fri, 10 May 2019 17:44:10 +0300 [thread overview]
Message-ID: <871s168j45.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20190508080704.24223-34-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Rename the engine this HW context is currently active upon (that we are
> flying upon) to disambiguate between the mixture of different active
> terms (and prevent conflict in future patches).
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/gt/intel_context_types.h | 2 +-
> drivers/gpu/drm/i915/gt/intel_lrc.c | 22 +++++++++----------
> 2 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_context_types.h b/drivers/gpu/drm/i915/gt/intel_context_types.h
> index 963a312430e6..825fcf0ac9c4 100644
> --- a/drivers/gpu/drm/i915/gt/intel_context_types.h
> +++ b/drivers/gpu/drm/i915/gt/intel_context_types.h
> @@ -37,7 +37,7 @@ struct intel_context {
>
> struct i915_gem_context *gem_context;
> struct intel_engine_cs *engine;
> - struct intel_engine_cs *active;
> + struct intel_engine_cs *inflight;
Active_on came to my mind when first reading this. As discussed
in irc 'active' is already quite overloaded so inflight seems
fitting.
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
>
> struct list_head signal_link;
> struct list_head signals;
> diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> index 64bd25a9e6f5..5e418bf46c46 100644
> --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> @@ -460,7 +460,7 @@ __unwind_incomplete_requests(struct intel_engine_cs *engine, int boost)
> __i915_request_unsubmit(rq);
> unwind_wa_tail(rq);
>
> - GEM_BUG_ON(rq->hw_context->active);
> + GEM_BUG_ON(rq->hw_context->inflight);
>
> /*
> * Push the request back into the queue for later resubmission.
> @@ -557,11 +557,11 @@ execlists_user_end(struct intel_engine_execlists *execlists)
> static inline void
> execlists_context_schedule_in(struct i915_request *rq)
> {
> - GEM_BUG_ON(rq->hw_context->active);
> + GEM_BUG_ON(rq->hw_context->inflight);
>
> execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_IN);
> intel_engine_context_in(rq->engine);
> - rq->hw_context->active = rq->engine;
> + rq->hw_context->inflight = rq->engine;
> }
>
> static void kick_siblings(struct i915_request *rq)
> @@ -576,7 +576,7 @@ static void kick_siblings(struct i915_request *rq)
> static inline void
> execlists_context_schedule_out(struct i915_request *rq, unsigned long status)
> {
> - rq->hw_context->active = NULL;
> + rq->hw_context->inflight = NULL;
> intel_engine_context_out(rq->engine);
> execlists_context_status_change(rq, status);
> trace_i915_request_out(rq);
> @@ -820,7 +820,7 @@ static bool virtual_matches(const struct virtual_engine *ve,
> const struct i915_request *rq,
> const struct intel_engine_cs *engine)
> {
> - const struct intel_engine_cs *active;
> + const struct intel_engine_cs *inflight;
>
> if (!(rq->execution_mask & engine->mask)) /* We peeked too soon! */
> return false;
> @@ -834,8 +834,8 @@ static bool virtual_matches(const struct virtual_engine *ve,
> * we reuse the register offsets). This is a very small
> * hystersis on the greedy seelction algorithm.
> */
> - active = READ_ONCE(ve->context.active);
> - if (active && active != engine)
> + inflight = READ_ONCE(ve->context.inflight);
> + if (inflight && inflight != engine)
> return false;
>
> return true;
> @@ -1023,7 +1023,7 @@ static void execlists_dequeue(struct intel_engine_cs *engine)
> u32 *regs = ve->context.lrc_reg_state;
> unsigned int n;
>
> - GEM_BUG_ON(READ_ONCE(ve->context.active));
> + GEM_BUG_ON(READ_ONCE(ve->context.inflight));
> virtual_update_register_offsets(regs, engine);
>
> if (!list_empty(&ve->context.signals))
> @@ -1501,7 +1501,7 @@ static void execlists_context_unpin(struct intel_context *ce)
> * had the chance to run yet; let it run before we teardown the
> * reference it may use.
> */
> - engine = READ_ONCE(ce->active);
> + engine = READ_ONCE(ce->inflight);
> if (unlikely(engine)) {
> unsigned long flags;
>
> @@ -1509,7 +1509,7 @@ static void execlists_context_unpin(struct intel_context *ce)
> process_csb(engine);
> spin_unlock_irqrestore(&engine->timeline.lock, flags);
>
> - GEM_BUG_ON(READ_ONCE(ce->active));
> + GEM_BUG_ON(READ_ONCE(ce->inflight));
> }
>
> i915_gem_context_unpin_hw_id(ce->gem_context);
> @@ -3103,7 +3103,7 @@ static void virtual_context_destroy(struct kref *kref)
> unsigned int n;
>
> GEM_BUG_ON(ve->request);
> - GEM_BUG_ON(ve->context.active);
> + GEM_BUG_ON(ve->context.inflight);
>
> for (n = 0; n < ve->num_siblings; n++) {
> struct intel_engine_cs *sibling = ve->siblings[n];
> --
> 2.20.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-05-10 14:44 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-08 8:06 [PATCH 01/40] drm/i915/hangcheck: Replace hangcheck.seqno with RING_HEAD Chris Wilson
2019-05-08 8:06 ` [PATCH 02/40] drm/i915: Rearrange i915_scheduler.c Chris Wilson
2019-05-08 8:06 ` [PATCH 03/40] drm/i915: Pass i915_sched_node around internally Chris Wilson
2019-05-08 10:15 ` Tvrtko Ursulin
2019-05-08 8:06 ` [PATCH 04/40] drm/i915: Check for no-op priority changes first Chris Wilson
2019-05-08 10:16 ` Tvrtko Ursulin
2019-05-08 8:06 ` [PATCH 05/40] drm/i915: Bump signaler priority on adding a waiter Chris Wilson
2019-05-08 8:06 ` [PATCH 06/40] drm/i915: Convert inconsistent static engine tables into an init error Chris Wilson
2019-05-08 8:06 ` [PATCH 07/40] drm/i915: Seal races between async GPU cancellation, retirement and signaling Chris Wilson
2019-05-08 10:21 ` Tvrtko Ursulin
2019-05-08 11:24 ` [PATCH] " Chris Wilson
2019-05-08 11:50 ` Tvrtko Ursulin
2019-05-08 8:06 ` [PATCH 08/40] dma-fence: Refactor signaling for manual invocation Chris Wilson
2019-05-08 11:25 ` [PATCH] " Chris Wilson
2019-05-08 11:52 ` Tvrtko Ursulin
2019-05-08 8:06 ` [PATCH 09/40] drm/i915: Restore control over ppgtt for context creation ABI Chris Wilson
2019-05-08 10:24 ` Tvrtko Ursulin
2019-05-08 8:06 ` [PATCH 10/40] drm/i915: Allow a context to define its set of engines Chris Wilson
2019-05-08 8:06 ` [PATCH 11/40] drm/i915: Extend I915_CONTEXT_PARAM_SSEU to support local ctx->engine[] Chris Wilson
2019-05-08 10:25 ` Tvrtko Ursulin
2019-05-08 8:06 ` [PATCH 12/40] drm/i915: Re-expose SINGLE_TIMELINE flags for context creation Chris Wilson
2019-05-08 10:26 ` Tvrtko Ursulin
2019-05-08 8:06 ` [PATCH 13/40] drm/i915: Allow userspace to clone contexts on creation Chris Wilson
2019-05-08 8:06 ` [PATCH 14/40] drm/i915: Load balancing across a virtual engine Chris Wilson
2019-05-08 10:29 ` Tvrtko Ursulin
2019-05-08 11:17 ` Chris Wilson
2019-05-08 11:36 ` Tvrtko Ursulin
2019-05-08 11:23 ` [PATCH] " Chris Wilson
2019-05-08 11:35 ` Tvrtko Ursulin
2019-05-08 8:06 ` [PATCH 15/40] drm/i915: Apply an execution_mask to the virtual_engine Chris Wilson
2019-05-08 10:13 ` Tvrtko Ursulin
2019-05-08 8:06 ` [PATCH 16/40] drm/i915: Extend execution fence to support a callback Chris Wilson
2019-05-08 8:06 ` [PATCH 17/40] drm/i915/execlists: Virtual engine bonding Chris Wilson
2019-05-08 8:06 ` [PATCH 18/40] drm/i915: Allow specification of parallel execbuf Chris Wilson
2019-05-08 8:06 ` [PATCH 19/40] drm/i915: Split GEM object type definition to its own header Chris Wilson
2019-05-08 8:06 ` [PATCH 20/40] drm/i915: Pull GEM ioctls interface to its own file Chris Wilson
2019-05-08 8:06 ` [PATCH 21/40] drm/i915: Move object->pages API to i915_gem_object.[ch] Chris Wilson
2019-05-08 8:06 ` [PATCH 22/40] drm/i915: Move shmem object setup to its own file Chris Wilson
2019-05-08 8:06 ` [PATCH 23/40] drm/i915: Move phys objects " Chris Wilson
2019-05-08 8:06 ` [PATCH 24/40] drm/i915: Move mmap and friends " Chris Wilson
2019-05-08 8:06 ` [PATCH 25/40] drm/i915: Move GEM domain management " Chris Wilson
2019-05-08 8:06 ` [PATCH 26/40] drm/i915: Move more GEM objects under gem/ Chris Wilson
2019-05-08 8:06 ` [PATCH 27/40] drm/i915: Pull scatterlist utils out of i915_gem.h Chris Wilson
2019-05-08 8:06 ` [PATCH 28/40] drm/i915: Move GEM object domain management from struct_mutex to local Chris Wilson
2019-05-08 8:06 ` [PATCH 29/40] drm/i915: Move GEM object waiting to its own file Chris Wilson
2019-05-10 14:17 ` Mika Kuoppala
2019-05-10 14:33 ` Chris Wilson
2019-05-08 8:06 ` [PATCH 30/40] drm/i915: Move GEM object busy checking " Chris Wilson
2019-05-10 14:29 ` Mika Kuoppala
2019-05-08 8:06 ` [PATCH 31/40] drm/i915: Move GEM client throttling " Chris Wilson
2019-05-10 14:37 ` Mika Kuoppala
2019-05-08 8:06 ` [PATCH 32/40] drm/i915: Drop the deferred active reference Chris Wilson
2019-05-08 8:06 ` [PATCH 33/40] drm/i915: Move object close under its own lock Chris Wilson
2019-05-08 8:06 ` [PATCH 34/40] drm/i915: Rename intel_context.active to .inflight Chris Wilson
2019-05-10 14:44 ` Mika Kuoppala [this message]
2019-05-08 8:06 ` [PATCH 35/40] drm/i915: Keep contexts pinned until after the next kernel context switch Chris Wilson
2019-05-08 8:07 ` [PATCH 36/40] drm/i915: Stop retiring along engine Chris Wilson
2019-05-08 8:07 ` [PATCH 37/40] drm/i915: Replace engine->timeline with a plain list Chris Wilson
2019-05-08 8:07 ` [PATCH 38/40] drm/i915: Flush the execution-callbacks on retiring Chris Wilson
2019-05-08 8:07 ` [PATCH 39/40] drm/i915/execlists: Preempt-to-busy Chris Wilson
2019-05-08 8:07 ` [PATCH 40/40] drm/i915/execlists: Minimalistic timeslicing Chris Wilson
2019-05-08 10:47 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/40] drm/i915/hangcheck: Replace hangcheck.seqno with RING_HEAD Patchwork
2019-05-08 10:59 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-05-08 11:09 ` ✓ Fi.CI.BAT: success " Patchwork
2019-05-08 11:49 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/40] drm/i915/hangcheck: Replace hangcheck.seqno with RING_HEAD (rev4) Patchwork
2019-05-08 12:06 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-05-08 12:10 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-05-08 12:30 ` [PATCH 01/40] drm/i915/hangcheck: Replace hangcheck.seqno with RING_HEAD Mika Kuoppala
2019-05-08 12:40 ` Chris Wilson
2019-05-08 14:00 ` Mika Kuoppala
2019-05-08 14:10 ` Chris Wilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871s168j45.fsf@gaia.fi.intel.com \
--to=mika.kuoppala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).