From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Intel-gfx@lists.freedesktop.org,
Tvrtko Ursulin <tursulin@ursulin.net>
Cc: Matthew Auld <matthew.auld@intel.com>
Subject: Re: [PATCH] i915/oa: Simplify updating contexts
Date: Thu, 13 Sep 2018 09:54:15 +0100 [thread overview]
Message-ID: <2e7615e0-962e-0983-e7f9-8feafbe797c0@linux.intel.com> (raw)
In-Reply-To: <153676745291.31648.5564874800693291759@skylake-alporthouse-com>
On 12/09/2018 16:50, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2018-09-12 16:29:30)
>> /*
>> * The OA register config is setup through the context image. This image
>> * might be written to by the GPU on context switch (in particular on
>> @@ -1833,7 +1727,7 @@ static int gen8_configure_all_contexts(struct drm_i915_private *dev_priv,
>> * the GPU from any submitted work.
>> */
>> ret = i915_gem_wait_for_idle(dev_priv,
>> - wait_flags,
>> + I915_WAIT_LOCKED,
>> MAX_SCHEDULE_TIMEOUT);
>
> Wait until idle includes a wait for the gpu to switch off. At least it
> does for execlists, not so clear for ringbuffer as there is no explicit
> idle-event. However, that shouldn't matter as the kernel context doesn't
> exist for legacy ringbuffer anyway ;) But the reload will be forced on
> the next actual use.
And on top this is only called on Gen8+!
>> if (ret)
>> return ret;
>> @@ -1859,7 +1753,17 @@ static int gen8_configure_all_contexts(struct drm_i915_private *dev_priv,
>> i915_gem_object_unpin_map(ce->state->obj);
>> }
>>
>> - return ret;
>> + /*
>> + * Apply the configuration by doing one context restore of the edited
>> + * context image.
>> + */
>> + rq = i915_request_alloc(engine, dev_priv->kernel_context);
>
> By feeding a request, you ensure the reconfig is loaded again. +1 for
> having it turn off when idle (and not instrument the kernel context at
> all)!
>
> Still I follow your logic that this should leave the oa config in
> exactly the same state as before the patch, so
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Thanks, yeah, I am not sure excluding kernel context is possible. If I
understand the comments in i915_perf.c, and how much Lionel explained to
me, when on we want it on all the time so sampling timers are always on
regardless of context switches.
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-09-13 8:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-12 15:29 [PATCH] i915/oa: Simplify updating contexts Tvrtko Ursulin
2018-09-12 15:46 ` Lionel Landwerlin
2018-09-12 15:50 ` Chris Wilson
2018-09-13 8:54 ` Tvrtko Ursulin [this message]
2018-09-13 8:58 ` Chris Wilson
2018-09-13 8:59 ` Chris Wilson
2018-09-12 16:58 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-09-13 8:43 ` Tvrtko Ursulin
2018-09-12 23:14 ` ✓ Fi.CI.IGT: " 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=2e7615e0-962e-0983-e7f9-8feafbe797c0@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=chris@chris-wilson.co.uk \
--cc=matthew.auld@intel.com \
--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 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.