[Intel-gfx] [PATCH v7 11/12] drm/i915/perf: execute OA configuration from command stream
Chris Wilson
chris at chris-wilson.co.uk
Tue Jul 9 10:02:58 UTC 2019
Quoting Lionel Landwerlin (2019-07-09 10:32:07)
> +static int emit_oa_config(struct drm_i915_private *i915,
> + struct i915_perf_stream *stream)
> {
> - u32 i;
> + struct i915_oa_config *oa_config = stream->oa_config;
> + struct i915_request *rq = stream->initial_config_rq;
> + struct i915_vma *vma;
> + u32 *cs;
> + int err;
>
> - for (i = 0; i < n_regs; i++) {
> - const struct i915_oa_reg *reg = regs + i;
> + vma = i915_vma_instance(oa_config->obj, &i915->ggtt.vm, NULL);
> + if (unlikely(IS_ERR(vma)))
> + return PTR_ERR(vma);
> +
> + err = i915_vma_pin(vma, 0, 0, PIN_GLOBAL);
> + if (err)
> + return err;
Hmm, still a lock inversion here as we will not be allowed to pin from
underneath rq->timeline->mutex.
-Chris
More information about the Intel-gfx
mailing list