i915/oa: Simplify updating contexts
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>
Wed, 12 Sep 2018 15:29:30 +0000 (16:29 +0100)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Thu, 13 Sep 2018 08:41:12 +0000 (09:41 +0100)
commit722f3de39e03fe123243ef24049fcdd5491f8da3
tree28591ae7e11f9b76b399d93fe796b735275d6c19
parentfce8d235e2ef733d00f3c94e8b23e274d61397be
i915/oa: Simplify updating contexts

We can remove the update-via-batch-buffer code path, which is basically an
effective duplicate of update-via-context-image path, if we notice that
after we have idled the GPU, we can update the context image even of the
kernel context directly. (Update-via-batch-buffer path existed only to
solve the problem of how to update the kernel context image.)

Only additional thing needed is to activate the edited configuration by
sending one empty request down the pipe. This accomplishes context restore
of the updated kernel context and so the OA configuration gets written out
to it's control registers.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20180912152930.28237-1-tvrtko.ursulin@linux.intel.com
drivers/gpu/drm/i915/i915_perf.c