drm/i915: Order two completing nop_submit_request
authorChris Wilson <[email protected]>
Fri, 6 Oct 2017 11:56:17 +0000 (12:56 +0100)
committerChris Wilson <[email protected]>
Fri, 6 Oct 2017 17:23:20 +0000 (18:23 +0100)
commit8d550824c6f52506754f11cb6be51aa153cc580d
tree026b3f7fa482214eb3bd96c32bcd61b71323630e
parent320671f94ada80ff036cc9d5dcd730ba4f3e0f1a
drm/i915: Order two completing nop_submit_request

If two nop's (requests in-flight following a wedged device) complete at
the same time, the global_seqno value written to the HWSP is undefined
as the two threads are not serialized.

v2: Use irqsafe spinlock. We expect the callback may be called from
inside another irq spinlock, so we can't unconditionally restore irqs.

Fixes: ce1135c7de64 ("drm/i915: Complete requests in nop_submit_request")
Signed-off-by: Chris Wilson <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Reviewed-by: Tvrtko Ursulin <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
drivers/gpu/drm/i915/i915_gem.c