Commit d7d50f80 authored by Chris Wilson's avatar Chris Wilson

drm/i915/perf: Schedule oa_config after modifying the contexts

We wish that the scheduler emit the context modification commands prior
to enabling the oa_config, for which we must explicitly inform it of the
ordering constraints. This is especially important as we now wait for
the final oa_config setup to be completed and as this wait may be on a
distinct context to the state modifications, we need that command packet
to be always last in the queue.

We borrow the i915_active for its ability to track multiple timelines
and the last dma_fence on each; a flexible dma_resv. Keeping track of
each dma_fence is important for us so that we can efficiently schedule
the requests and reprioritise as required.
Reported-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200327112212.16046-3-chris@chris-wilson.co.uk
parent 229007e0
This diff is collapsed.
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
struct drm_i915_private; struct drm_i915_private;
struct file; struct file;
struct i915_active;
struct i915_gem_context; struct i915_gem_context;
struct i915_perf; struct i915_perf;
struct i915_vma; struct i915_vma;
...@@ -340,8 +341,8 @@ struct i915_oa_ops { ...@@ -340,8 +341,8 @@ struct i915_oa_ops {
* counter reports being sampled. May apply system constraints such as * counter reports being sampled. May apply system constraints such as
* disabling EU clock gating as required. * disabling EU clock gating as required.
*/ */
struct i915_request * int (*enable_metric_set)(struct i915_perf_stream *stream,
(*enable_metric_set)(struct i915_perf_stream *stream); struct i915_active *active);
/** /**
* @disable_metric_set: Remove system constraints associated with using * @disable_metric_set: Remove system constraints associated with using
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment