drm/i915/perf: Configure OAR for specific context
authorUmesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Fri, 6 Dec 2019 19:43:39 +0000 (11:43 -0800)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 9 Dec 2019 13:38:17 +0000 (15:38 +0200)
commitccdeed497042676e13fc1625e2a341880eff5da5
treeb56d4200e9c22cb3669572f0b0dc0f764e92105a
parent322d56aa3145a28445907ecc638a2c3aa3295c6b
drm/i915/perf: Configure OAR for specific context

Gen12 supports saving/restoring render counters per context. Apply OAR
configuration only for the context that is passed in to perf.

v2:
- Fix OACTXCONTROL value to only stop/resume counters.
- Remove gen12_update_reg_state_unlocked as power state is already
  applied by the caller.

v3: (Lionel)
- Move register initialization into the array
- Assume a valid oa_config in enable_metric_set

Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Fixes: 00a7f0d7155c ("drm/i915/tgl: Add perf support on TGL")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191206194339.31356-2-umesh.nerlige.ramappa@intel.com
drivers/gpu/drm/i915/i915_perf.c