[Intel-gfx] [PATCH v3 3/3] drm/i915: Fix premature LRC unpin in GuC mode

Chris Wilson chris at chris-wilson.co.uk
Fri Jan 22 08:44:45 PST 2016


On Fri, Jan 22, 2016 at 04:33:18PM +0000, Tvrtko Ursulin wrote:
> I was confused by the current code which does the reset after unpinning:
> 
> ...
> 	i915_gem_reset(dev);
> 
> 	simulated = dev_priv->gpu_error.stop_rings != 0;
> 
> 	ret = intel_gpu_reset(dev);
> ...
> 
> 
> What is right then?

Yeah, it would be better to do the sw reset after the hw reset so that
the GPU is a known state when we tear down everything.
 
> Sounds bad to be unpinning with the GPU in unknown state. But
> obviously it has been like this for who knows how long. So I have no
> idea. :(

i915_reset() is only called on a hung GPU, and I expect we simply
haven't stressed the system enough with an active-vs-hung pair of
engines to be able to see stray writes and whatnot.

The downside is that if we jiggle the i915_gem_reset() we have to ask
the awkward question of what to do with state when reset fails? We
should keep it around because the hw state is unknown - but that can be
a significant amount of memory trapped.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list