Commit b838cbee authored by Daniel Vetter's avatar Daniel Vetter

drm/i915: Remove bogus locking check in the hangcheck code

You can _never_ assert that a lock is not held, except in some very
restricted corner cases where it's guranteed that your code is running
single-threade (e.g. driver load before you've published any pointers
leading to that lock).

In addition the early return breaks a bunch of testcases since with
highly concurrent hangcheck stress tests the reset fails to work and
the test doesn't recover and time out.

This regression has been introduced in

commit b8d24a06
Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Date:   Wed Jan 28 17:03:14 2015 +0200

    drm/i915: Remove nested work in gpu error handling

Aside: It is possible to check whether a given task doesn't hold a
lock, but only when lockdep is enabled, using the lockdep_assert_held
stuff.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88908Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
parent 1293eaa3
...@@ -2612,9 +2612,6 @@ void i915_handle_error(struct drm_device *dev, bool wedged, ...@@ -2612,9 +2612,6 @@ void i915_handle_error(struct drm_device *dev, bool wedged,
va_list args; va_list args;
char error_msg[80]; char error_msg[80];
if (WARN_ON(mutex_is_locked(&dev_priv->dev->struct_mutex)))
return;
va_start(args, fmt); va_start(args, fmt);
vscnprintf(error_msg, sizeof(error_msg), fmt, args); vscnprintf(error_msg, sizeof(error_msg), fmt, args);
va_end(args); va_end(args);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment