]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: don't trylock in the gpu reset code
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 4 Jul 2012 20:18:39 +0000 (22:18 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 5 Jul 2012 08:00:46 +0000 (10:00 +0200)
commitb42d8e1e2851f588c9b9b43a1a2ed4fa8c8fb5a9
tree8aacb1a8e7b08770507630a3d7d3f40c0b27a88b
parentf7f227d796e44a78934bb7607f32bd829f65d868
drm/i915: don't trylock in the gpu reset code

Simply failing to reset the gpu because someone else might still hold
the mutex isn't a great idea - I see reliable silent reset failures.
And gpu reset simply needs to be reliable and Just Work.

"But ... the deadlocks!"

We already kick all processes waiting for the gpu before launching the
reset work item. New waiters need to check the wedging state anyway
and then bail out. If we have places that can deadlock, we simply need
to fix them.

"But ... testing!"

We have the gpu hangman, and if the current gpu load gem_exec_nop
isn't good enough to hit a specific case, we can add a new one.

"But ...  don't we return -EAGAIN for non-interruptible calls to
wait_seqno now?"

Yep, but this problem already exists in the current code. A follow up
patch will remedy this by returning -EIO for non-interruptible sleeps
if the gpu died and the low-level wait bails out with -EAGAIN.

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_drv.c