drm/i915/execlists: Pull CSB reset under the timeline.lock
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 28 Jun 2018 20:12:05 +0000 (21:12 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 28 Jun 2018 21:55:04 +0000 (22:55 +0100)
commitd8857d541c67110cdcedb330e9677efdc9c5844d
tree2ccdf1775d4b8191b71aa7a46446babdeddfcbf0
parent0b02befa828c0be67a5416e10a0244e181fde0d3
drm/i915/execlists: Pull CSB reset under the timeline.lock

In the following patch, we will process the CSB events under the
timeline.lock and not serialised by the tasklet. This also means that we
will need to protect access to common variables such as
execlists->csb_head with the timeline.lock during reset.

v2: Move sync_irq to avoid deadlocks between taking timeline.lock from
our interrupt handler.
v3: Kill off the synchronize_hardirq as it raises more questions than
answered; now we use the timeline.lock entirely for CSB serialisation
between the irq and elsewhere, we don't need to be so heavy handed with
flushing
v4: Treat request cancellation (wedging after failed reset) similarly

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180628201211.13837-3-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_lrc.c