[Intel-gfx] [RFC 2/3] drm/i915: Engine busy time tracking
Joonas Lahtinen
joonas.lahtinen at linux.intel.com
Wed May 10 12:41:17 UTC 2017
On ti, 2017-05-09 at 15:09 +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
>
> Track total time requests have been executing on the hardware.
>
> To make this cheap it is hidden behind a static branch with the
> intention that it is only enabled when there is a consumer
> listening. This means that in the default off case the total
> cost of the tracking is just a few no-op instructions on the
> fast paths.
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
<SNIP>
> @@ -309,12 +309,14 @@ execlists_context_status_change(struct drm_i915_gem_request *rq,
> static inline void
> execlists_context_schedule_in(struct drm_i915_gem_request *rq)
> {
> + intel_engine_context_in(rq->engine);
> execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_IN);
> }
>
> static inline void
> execlists_context_schedule_out(struct drm_i915_gem_request *rq)
> {
> + intel_engine_context_out(rq->engine);
> execlists_context_status_change(rq, INTEL_CONTEXT_SCHEDULE_OUT);
> }
It's the perfect opportunity to actually use the notifier chain and
optimize its "empty" case instead of rolling our own.
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
More information about the Intel-gfx
mailing list