Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3b0391a authored by Chris Wilson's avatar Chris Wilson
Browse files

drm/i915: Detect potential i915_reset_trylock() lockups



Use lockdep to warn before we wait indefinitely in case we may be
waiting indefinitely.

Suggested-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
References: 2caffbf1 ("drm/i915: Revoke mmaps and prevent access to fence registers across reset")
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190212130831.14425-2-chris@chris-wilson.co.uk
parent aeaaa55c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1305,6 +1305,9 @@ int i915_reset_trylock(struct drm_i915_private *i915)
	struct i915_gpu_error *error = &i915->gpu_error;
	int srcu;

	might_lock(&error->reset_backoff_srcu);
	might_sleep();

	rcu_read_lock();
	while (test_bit(I915_RESET_BACKOFF, &error->flags)) {
		rcu_read_unlock();