drm/i915/perf: Assert locking for i915_init_oa_perf_state()
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 30 Aug 2019 18:19:29 +0000 (19:19 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 31 Aug 2019 15:08:28 +0000 (16:08 +0100)
commitdffa8feb308455f9b3ce0eeb55a4eac3afc0786b
treeb8a0222155f0603127692af3c5ca9744466dcee3
parent3d1da92baffe69cf847699ceccf4297356da58fa
drm/i915/perf: Assert locking for i915_init_oa_perf_state()

We use the context->pin_mutex to serialise updates to the OA config and
the registers values written into each new context. Document this
relationship and assert we do hold the context->pin_mutex as used by
gen8_configure_all_contexts() to serialise updates to the OA config
itself.

v2: Add a white-lie for when we call intel_gt_resume() from init.
v3: Lie while we have the context pinned inside atomic reset.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> #v1
Link: https://patchwork.freedesktop.org/patch/msgid/20190830181929.18663-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_gt_pm.c
drivers/gpu/drm/i915/gt/intel_lrc.c
drivers/gpu/drm/i915/i915_perf.c