]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gt: Defer enabling the breadcrumb interrupt to after submission
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 23 Nov 2020 11:37:14 +0000 (11:37 +0000)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 24 Nov 2020 17:17:41 +0000 (09:17 -0800)
commit6baae2e7cd922ea7c7871e69c0bfc328f097a90c
treefcffaa3dcf59cd8d4befc23bd40a8374fc9ae222
parent4fb4468a763eebc83d32b6e3899b5f02b261a0af
drm/i915/gt: Defer enabling the breadcrumb interrupt to after submission

Move the register slow register write and readback from out of the
critical path for execlists submission and delay it until the following
worker, shaving off around 200us. Note that the same signal_irq_work() is
allowed to run concurrently on each CPU (but it will only be queued once,
once running though it can be requeued and reexecuted) so we have to
remember to lock the global interactions as we cannot rely on the
signal_irq_work() itself providing the serialisation (in constrast to a
tasklet).

By pushing the arm/disarm into the central signaling worker we can close
the race for disarming the interrupt (and dropping its associated
GT wakeref) on parking the engine. If we loose the race, that GT wakeref
may be held indefinitely, preventing the machine from sleeping while
the GPU is ostensibly idle.

v2: Move the self-arming parking of the signal_irq_work to a flush of
the irq-work from intel_breadcrumbs_park().

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2271
Fixes: 4b3845bd888c ("drm/i915/gt: Hold context/request reference while breadcrumbs are active")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201123113717.20500-1-chris@chris-wilson.co.uk
(cherry picked from commit 9d5612ca165a58aacc160465532e7998b9aab270)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/gt/intel_breadcrumbs.c