drm/i915: Clear lost context-switch interrupts across reset
authorChris Wilson <[email protected]>
Mon, 7 Aug 2017 12:19:19 +0000 (13:19 +0100)
committerChris Wilson <[email protected]>
Fri, 18 Aug 2017 21:42:13 +0000 (22:42 +0100)
commit64f09f00caf0a7cb40a8c0b85789bacba0f51d9e
tree2037060561a5b3530e2da54b1ca5a6f0e0f05571
parenta42894ebb50d831ec0b7ee9bee7f5a5a37bad7e1
drm/i915: Clear lost context-switch interrupts across reset

During a global reset, we disable the irq. As we disable the irq, the
hardware may be raising a GT interrupt that we then ignore, leaving it
pending in the GTIIR. After the reset, we then re-enable the irq,
triggering the pending interrupt. However, that interrupt was for the
stale state from before the reset, and the contents of the CSB buffer
are now invalid.

v2: Add a comment to make it clear that the double clear is purely my
paranoia.

Reported-by: "Dong, Chuanxiao" <[email protected]>
Fixes: 821ed7df6e2a ("drm/i915: Update reset path to fix incomplete requests")
Signed-off-by: Chris Wilson <[email protected]>
Cc: "Dong, Chuanxiao" <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Cc: Michal Winiarski <[email protected]>
Cc: Michel Thierry <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Michel Thierry <[email protected]>
drivers/gpu/drm/i915/intel_lrc.c