From: Sourab Gupta <sourab.gupta@xxxxxxxxx> This patch inserts the commands in the ring for capturing OA snapshots across batchbuffer boundaries. The data generated thus, would be of Batchbuffer granularity. This data can be useful standalone for per batch buffer profiling purposes. The issue of counter wraparound for large batch buffers can be subverted by using this data in conjunction with the periodic OA sample data which is generated alongside per BB snapshot data. Such data gives useful information to userspace tool in order to analyse batchbuffer specific performance and timing information. Signed-off-by: Sourab Gupta <sourab.gupta@xxxxxxxxx> --- drivers/gpu/drm/i915/i915_gem_execbuffer.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index 3336e1c..f5a2308 100644 --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c @@ -1318,6 +1318,10 @@ i915_gem_ringbuffer_submission(struct drm_device *dev, struct drm_file *file, } exec_len = args->batch_len; + + i915_insert_profiling_cmd(ring->buffer, + i915_execbuffer2_get_context_id(*args)); + if (cliprects) { for (i = 0; i < args->num_cliprects; i++) { ret = i915_emit_box(ring, &cliprects[i], @@ -1339,6 +1343,9 @@ i915_gem_ringbuffer_submission(struct drm_device *dev, struct drm_file *file, return ret; } + i915_insert_profiling_cmd(ring->buffer, + i915_execbuffer2_get_context_id(*args)); + trace_i915_gem_ring_dispatch(intel_ring_get_request(ring), dispatch_flags); i915_gem_execbuffer_move_to_active(vmas, ring); -- 1.8.5.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx