[Intel-gfx] [PATCH 4/5] drm/i915: don't trylock in the gpu reset code

Chris Wilson chris at chris-wilson.co.uk
Mon Jun 25 22:10:26 CEST 2012


On Sun, 24 Jun 2012 16:42:35 +0200, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
> 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.

GPU reset needs to just work, and if it can't then we need to avoid
locking up the machine...

Consider hitting an OOPS whlist holding the struct mutex and then
getting a hang, we end up with a struct worker thread. Not as bad as it
once was, but it can still make rebooting tricky at times.

How about a compromise,
while(!timeout) {if (trylock()) break; msleep(1); } ?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list