[PATCH 066/109] lockdep-hax

Chris Wilson chris at chris-wilson.co.uk
Wed Jan 2 16:47:23 UTC 2019


---
 drivers/gpu/drm/i915/i915_sw_fence.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_sw_fence.c b/drivers/gpu/drm/i915/i915_sw_fence.c
index e45f533a3570..7e4ab51be26c 100644
--- a/drivers/gpu/drm/i915/i915_sw_fence.c
+++ b/drivers/gpu/drm/i915/i915_sw_fence.c
@@ -145,7 +145,7 @@ static void __i915_sw_fence_wake_up_all(struct i915_sw_fence *fence,
 	 * (and so added to the list to be woken).
 	 */
 
-	spin_lock_irqsave_nested(&x->lock, flags, 1 + !!continuation);
+	spin_lock_irqsave(&x->lock, flags);
 	if (continuation) {
 		list_for_each_entry_safe(pos, next, &x->head, entry) {
 			if (pos->func == autoremove_wake_function)
@@ -218,6 +218,12 @@ void __i915_sw_fence_init(struct i915_sw_fence *fence,
 	debug_fence_init(fence);
 
 	__init_waitqueue_head(&fence->wait, name, key);
+#if IS_ENABLED(CONFIG_LOCKDEP)
+	lockdep_set_class_and_subclass(&fence->wait.lock,
+				       &__lockdep_no_validate__,
+				       1);
+#endif
+
 	atomic_set(&fence->pending, 1);
 	fence->flags = (unsigned long)fn;
 }
-- 
2.20.1



More information about the Intel-gfx-trybot mailing list