]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: don't hang userspace when the gpu reset is stuck
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 4 Jul 2012 20:18:41 +0000 (22:18 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 5 Jul 2012 08:02:24 +0000 (10:02 +0200)
commitd42fc07c8b9e510719ff429c917288dd9a7f478a
tree0d95f079646600480196cf5ac98ce3034a5e5d1a
parent559f1a280f1bf168d954626b53ae299295380d73
drm/i915: don't hang userspace when the gpu reset is stuck

With the gpu reset no longer using a trylock we've increased the
chances of userspace getting stuck quite a bit. To make that
(hopefully) rare case more paletable time out when waiting for the gpu
reset code to complete and signal this little issue to the caller by
returning -EIO.

This should help userspace to somewhat gracefully fall back and
hopefully allow the user to grab some logs and reboot the machine
(instead of staring at a frozen X screen in agony).

Suggested by Chris Wilson because I've been stubborn about allowing
the gpu reset code no to fail, ever (by removing the trylock).

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c