drm/i915/execlists: Use a locked clear_bit() for synchronisation with interrupt
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 21 Mar 2018 09:10:27 +0000 (09:10 +0000)
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Tue, 27 Mar 2018 08:20:00 +0000 (11:20 +0300)
commit76cb9d314a5385020c3adabf563df8efe71c6325
tree7ad192169bcc3cb2a2c48b057bdb584a8c217d67
parent8f30c4085b72485c05e85d56e9a84098da2ba5b7
drm/i915/execlists: Use a locked clear_bit() for synchronisation with interrupt

We were relying on the uncached reads when processing the CSB to provide
ourselves with the serialisation with the interrupt handler (so we could
detect new interrupts in the middle of processing the old one). However,
in commit 767a983ab255 ("drm/i915/execlists: Read the context-status HEAD
from the HWSP") those uncached reads were eliminated (on one path at
least) and along with them our serialisation. The result is that we
would very rarely miss notification of a new interrupt and leave a
context-switch unprocessed, hanging the GPU.

Fixes: 767a983ab255 ("drm/i915/execlists: Read the context-status HEAD from the HWSP")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michel Thierry <michel.thierry@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180321091027.21034-1-chris@chris-wilson.co.uk
(cherry picked from commit 9153e6b7c85edbc89e874e5c83f86217c53dcfaf)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/intel_lrc.c