From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/i915/guc: Advance over port[0] if set and not preempting
Date: Fri, 24 Nov 2017 15:48:29 +0200 [thread overview]
Message-ID: <87indzss7m.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20171124133745.5173-1-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Our execlist emulation is intended to only use a maximum of 2 ports per
> engine, so as to not overflow the wq. (By knowing the limits, we can
> avoid having to handle the wq exhaustion.) However, upon adding
> preemption, we lost the skip over the first port if set for the
> non-preemption path. Restore it.
>
> Reported-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Fixes: c41937fd994a ("drm/i915/guc: Preemption! With GuC")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michał Winiarski <michal.winiarski@intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Now it makes sense to me. You might want a stamp from Michał too.
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_guc_submission.c | 29 ++++++++++++++++-------------
> 1 file changed, 16 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c
> index cbf5a96f5806..70e64bdb73dd 100644
> --- a/drivers/gpu/drm/i915/intel_guc_submission.c
> +++ b/drivers/gpu/drm/i915/intel_guc_submission.c
> @@ -743,23 +743,26 @@ static void guc_dequeue(struct intel_engine_cs *engine)
> if (!rb)
> goto unlock;
>
> - if (HAS_LOGICAL_RING_PREEMPTION(engine->i915) && port_isset(port)) {
> - struct guc_preempt_work *preempt_work =
> - &engine->i915->guc.preempt_work[engine->id];
> -
> - if (rb_entry(rb, struct i915_priolist, node)->priority >
> - max(port_request(port)->priotree.priority, 0)) {
> - execlists_set_active(execlists,
> - EXECLISTS_ACTIVE_PREEMPT);
> - queue_work(engine->i915->guc.preempt_wq,
> - &preempt_work->work);
> - goto unlock;
> - } else if (port_isset(last_port)) {
> - goto unlock;
> + if (port_isset(port)) {
> + if (HAS_LOGICAL_RING_PREEMPTION(engine->i915)) {
> + struct guc_preempt_work *preempt_work =
> + &engine->i915->guc.preempt_work[engine->id];
> +
> + if (rb_entry(rb, struct i915_priolist, node)->priority >
> + max(port_request(port)->priotree.priority, 0)) {
> + execlists_set_active(execlists,
> + EXECLISTS_ACTIVE_PREEMPT);
> + queue_work(engine->i915->guc.preempt_wq,
> + &preempt_work->work);
> + goto unlock;
> + }
> }
>
> port++;
> + if (port_isset(port))
> + goto unlock;
> }
> + GEM_BUG_ON(port_isset(port));
>
> do {
> struct i915_priolist *p = rb_entry(rb, typeof(*p), node);
> --
> 2.15.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-11-24 13:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-24 13:37 [PATCH 1/2] drm/i915/guc: Advance over port[0] if set and not preempting Chris Wilson
2017-11-24 13:37 ` [PATCH 2/2] HAX Enable GuC Submission for CI Chris Wilson
2017-11-24 13:43 ` [PATCH 1/2] drm/i915/guc: Advance over port[0] if set and not preempting Chris Wilson
2017-11-24 13:50 ` Mika Kuoppala
2017-11-24 13:48 ` Mika Kuoppala [this message]
2017-11-24 14:16 ` ✓ Fi.CI.BAT: success for series starting with [1/2] " Patchwork
2017-11-24 15:11 ` [PATCH 1/2] " Michał Winiarski
2017-11-24 17:02 ` ✓ Fi.CI.IGT: success for series starting with [1/2] " Patchwork
2017-11-24 17:11 ` 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=87indzss7m.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.