drm/i915/perf: Save/restore EU flex counters across reset
authorUmesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Wed, 26 Oct 2022 22:20:59 +0000 (22:20 +0000)
committerJohn Harrison <John.C.Harrison@Intel.com>
Thu, 27 Oct 2022 19:36:59 +0000 (12:36 -0700)
commitfa569804341803032d260de3570bc6bc1698b790
tree11f43d14446dbe89411040d0640d902d73206208
parentbc7ed4d30815bc434c1e49dc6784164b352d167c
drm/i915/perf: Save/restore EU flex counters across reset

If a drm client is killed, then hw contexts used by the client are reset
immediately. This reset clears the EU flex counter configuration. If an
OA use case is running in parallel, it would start seeing zeroed eu
counter values following the reset even if the drm client is restarted.
Save/restore the EU flex counter config so that the EU counters can be
monitored continuously across resets.

v2:
- Save/restore eu flex config only for gen12, as for pre-gen12, these
  are saved and restored in the context image.

Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221026222102.5526-14-umesh.nerlige.ramappa@intel.com
drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c