@@ -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);