Skip to content

Commit

Permalink
drm/i915: Be paranoid and bail on resetting if we can't take the lock.
Browse files Browse the repository at this point in the history
This will declare the machine wedged, but is better than truly wedging
the machine.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
  • Loading branch information
Chris Wilson committed Dec 5, 2010
1 parent 4add75c commit 340479a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/i915/i915_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,8 @@ int i915_reset(struct drm_device *dev, u8 flags)
bool need_display = true;
int ret;

mutex_lock(&dev->struct_mutex);
if (!mutex_trylock(&dev->struct_mutex))
return -EBUSY;

i915_gem_reset(dev);

Expand Down

0 comments on commit 340479a

Please sign in to comment.