[Intel-gfx] [PATCH 3/3] drm/i915/perf: enable OAR context save/restore of performance counters

Lionel Landwerlin lionel.g.landwerlin at intel.com
Tue Oct 15 07:44:53 UTC 2019


On 14/10/2019 22:58, Chris Wilson wrote:
> Quoting Umesh Nerlige Ramappa (2019-10-14 19:55:31)
>> @@ -2313,6 +2377,17 @@ static int lrc_configure_all_contexts(struct i915_perf_stream *stream,
>>                          return err;
>>                  }
>>   
>> +               /*
>> +                * For Gen12, performance counters are context
>> +                * saved/restored. Only enable it for the context that
>> +                * requested this.
>> +                */
>> +               if (ctx == stream->ctx && IS_GEN(i915, 12)) {
>> +                       err = gen12_configure_context_oar(ctx, oa_config != NULL);
>
> regs[CTX_CONTEXT_CONTROL] |= intel_lrc_make_ctx_control(engine);
>
> can be modified with a plain LRI (at least I have successfully modified
> INHIBIT_SYN_CTX before). Have you tried just emitting an LRI in the pinned
> context?
> -Chris
>
Not yet, good to know :)

Sounds a lot simpler.


-Lionel



More information about the Intel-gfx mailing list