From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Tvrtko Ursulin <tursulin@ursulin.net>,
Intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/i915/guc: Support engine busy stats
Date: Thu, 22 Feb 2018 08:26:58 +0000 [thread overview]
Message-ID: <9fbb7efb-095a-a97d-f352-cd61deae079b@linux.intel.com> (raw)
In-Reply-To: <151928589597.11316.598392340538696585@mail.alporthouse.com>
On 22/02/2018 07:51, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2018-02-22 06:07:32)
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> Place context in/out hooks into the GuC backend, when contexts are
>> assigned to ports, and removed from them, in order to be able to
>> provide engine busy stats in GuC mode.
>>
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> Testcase: igt/perf_pmu/busy-accuracy-*-*
>> ---
>> drivers/gpu/drm/i915/intel_guc_submission.c | 13 ++++++++++---
>> 1 file changed, 10 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c
>> index 649113c7a3c2..8e99f8fd6da2 100644
>> --- a/drivers/gpu/drm/i915/intel_guc_submission.c
>> +++ b/drivers/gpu/drm/i915/intel_guc_submission.c
>> @@ -673,6 +673,7 @@ static void guc_dequeue(struct intel_engine_cs *engine)
>> struct intel_engine_execlists * const execlists = &engine->execlists;
>> struct execlist_port *port = execlists->port;
>> struct i915_request *last = NULL;
>> + struct i915_gem_context *last_ctx = NULL;
>> const struct execlist_port * const last_port =
>> &execlists->port[execlists->port_mask];
>> bool submit = false;
>> @@ -718,8 +719,13 @@ static void guc_dequeue(struct intel_engine_cs *engine)
>> goto done;
>> }
>>
>> - if (submit)
>> + if (submit) {
>> port_assign(port, last);
>> + if (last->ctx != last_ctx) {
>> + intel_engine_context_in(last->engine);
>> + last_ctx = last->ctx;
>> + }
>> + }
>> port++;
>> }
>>
>> @@ -741,6 +747,8 @@ static void guc_dequeue(struct intel_engine_cs *engine)
>> execlists->first = rb;
>> if (submit) {
>> port_assign(port, last);
>> + if (last->ctx != last_ctx)
>> + intel_engine_context_in(last->engine);
>> execlists_set_active(execlists, EXECLISTS_ACTIVE_USER);
>> guc_submit(engine);
>> }
>> @@ -763,6 +771,7 @@ static void guc_submission_tasklet(unsigned long data)
>>
>> rq = port_request(&port[0]);
>> while (rq && i915_request_completed(rq)) {
>> + intel_engine_context_out(rq->engine);
>
> If we only emit context_in once for 2 consecutive rq with the same
> context, we would need to do the same for context_out.
>
> Will be interesting to see if this explodes, or we may need yet another
> test :)
I thought two consecutive requests with the same context is one port, so
one context_in and one context_out. But maybe I'm wrong. Lets wait and
see as you say. :)
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-02-22 8:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-21 17:25 [PATCH 1/2] drm/i915/guc: Support engine busy stats Tvrtko Ursulin
2018-02-21 17:25 ` [PATCH 2/2] drm/i915: GuC test run Tvrtko Ursulin
2018-02-21 17:41 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915/guc: Support engine busy stats Patchwork
2018-02-21 17:56 ` ✗ Fi.CI.BAT: failure " Patchwork
2018-02-21 19:17 ` ✗ Fi.CI.CHECKPATCH: warning " Patchwork
2018-02-21 19:31 ` ✗ Fi.CI.BAT: failure " Patchwork
2018-02-22 6:07 ` [PATCH 1/2] " Tvrtko Ursulin
2018-02-22 7:51 ` Chris Wilson
2018-02-22 8:26 ` Tvrtko Ursulin [this message]
2018-02-22 8:31 ` Chris Wilson
2018-02-22 6:30 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915/guc: Support engine busy stats (rev2) Patchwork
2018-02-22 6:44 ` ✓ Fi.CI.BAT: success " Patchwork
2018-02-22 9:01 ` ✗ Fi.CI.IGT: failure " Patchwork
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=9fbb7efb-095a-a97d-f352-cd61deae079b@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=chris@chris-wilson.co.uk \
--cc=tursulin@ursulin.net \
/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