On 27/01/2017 12:27, Chris Wilson wrote:
On Fri, Jan 27, 2017 at 12:01:26PM +0000, Tvrtko Ursulin wrote:
From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
Two new tracepoints placed at the call sites where requests are
actually passed to the GPU enable userspace to track engine
utilisation.
These tracepoints are only enabled when the
DRM_I915_LOW_LEVEL_TRACEPOINTS Kconfig option is enabled.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
---
drivers/gpu/drm/i915/i915_guc_submission.c | 2 ++
drivers/gpu/drm/i915/i915_trace.h | 49 ++++++++++++++++++++++++++++++
drivers/gpu/drm/i915/intel_lrc.c | 4 +++
3 files changed, 55 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
index 8ced9e26f075..beec88a30347 100644
--- a/drivers/gpu/drm/i915/i915_guc_submission.c
+++ b/drivers/gpu/drm/i915/i915_guc_submission.c
@@ -518,6 +518,8 @@ static void __i915_guc_submit(struct drm_i915_gem_request *rq)
if (i915_vma_is_map_and_fenceable(rq->ring->vma))
POSTING_READ_FW(GUC_STATUS);
+ trace_i915_gem_request_in(rq, 0);
But how to get out for guc? We could do a similar in for ringbuffer.
The original way I used it was in == dispatch, out == ring-notify, which
is why trace_i915_gem_ring_dispatch enabled the signaling.
That was my thinking as well.
Hmm. Following on from that we can add the out tracepoint as a
fence-callback. For the moment, I'd drop guc/legacy
trace_i915_gem_request_in and we will try something more magical. Though
once we do enable the fake GuC scheduler we will have an appropriate
place to drop an trace_i915_gem_request_out. Just leaving ringbuffer as
the odd one out, but for who arguably the in/out logic is not as
important.
Fence signalled is very lazy if no one is listening, no? So until the
GUC backend I thought request_in and deriving the _out from _notify in
userspace would be OK. Meaning enable signalling stays until then.
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx