]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/perf: execute OA configuration from command stream
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Sat, 12 Oct 2019 07:23:08 +0000 (08:23 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 12 Oct 2019 08:08:40 +0000 (09:08 +0100)
commit91495985d41563613074b450cc79c4668ee4cb5c
tree743e91a3bf80cbc3cd1e4c1757a54b82f785c973
parentccc867a584bbe51c587a237af103eb39608e0a4d
drm/i915/perf: execute OA configuration from command stream

We haven't run into issues with programming the global OA/NOA
registers configuration from CPU so far, but HW engineers actually
recommend doing this from the command streamer. On TGL in particular
one of the clock domain in which some of that programming goes might
not be powered when we poke things from the CPU.

Since we have a command buffer prepared for the execbuffer side of
things, we can reuse that approach here too.

This also allows us to significantly reduce the amount of time we hold
the main lock.

v2: Drop the global lock as much as possible

v3: Take global lock to pin global

v4: Create i915 request in emit_oa_config() to avoid deadlocks (Lionel)

v5: Move locking to the stream (Lionel)

v6: Move active reconfiguration request into i915_perf_stream (Lionel)

v7: Pin VMA outside request creation (Chris)
    Lock VMA before move to active (Chris)

v8: Fix double free on stream->initial_oa_config_bo (Lionel)
    Don't allow interruption when waiting on active config request
    (Lionel)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20191012072308.30312-3-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_perf.c