[Intel-gfx] [PATCH v7 2/4] drm/i915/perf: stop using the kernel context
Chris Wilson
chris at chris-wilson.co.uk
Tue Apr 28 10:19:00 UTC 2020
Quoting Lionel Landwerlin (2020-04-28 11:08:14)
> @@ -2837,6 +2851,7 @@ static int i915_oa_stream_init(struct i915_perf_stream *stream,
> {
> struct drm_i915_private *i915 = stream->perf->i915;
> struct i915_perf *perf = stream->perf;
> + struct intel_timeline *timeline;
> int format_size;
> int ret;
>
> @@ -2946,10 +2961,30 @@ static int i915_oa_stream_init(struct i915_perf_stream *stream,
>
> stream->ops = &i915_oa_stream_ops;
>
> + timeline = intel_timeline_create(stream->engine->gt, NULL);
> + if (IS_ERR(timeline)) {
> + ret = PTR_ERR(timeline);
> + goto err_timeline;
> + }
> +
> + stream->config_context = intel_context_create(stream->engine);
> + if (IS_ERR(stream->config_context)) {
> + intel_timeline_put(timeline);
> + ret = PTR_ERR(stream->config_context);
> + goto err_timeline;
> + }
> +
> + stream->config_context->sseu = props->sseu;
> + stream->config_context->timeline = timeline;
Timeline?
> +
> + ret = intel_context_pin(stream->config_context);
One is created for the context here [via intel_context_alloc].
I was intrigued as I thought you might have had something special planned
with multiple contexts sharing a timeline
Do we need to permanently pin the context? We can fail the OA config
change request, right?
-Chris
More information about the Intel-gfx
mailing list