[Intel-gfx] [PATCH] drm/i915/gem: Lazily acquire the device wakeref for freeing objects

Chris Wilson chris at chris-wilson.co.uk
Tue Apr 28 09:55:58 UTC 2020


Quoting Janusz Krzysztofik (2020-04-28 10:53:38)
> Hi Chris,
> 
> On Fri, 2020-04-24 at 16:24 +0100, Chris Wilson wrote:
> > We only need the device wakeref on freeing the objects if we have to
> > unbind the object from the global GTT, or otherwise update device
> > information. If the objects are clean, we never need the wakeref, so
> > avoid taking until required.
> 
> Makes sense.
> > 
> > For this to be effective in preventing us from waking the device after
> > it is unbind, we also need to mark the GGTT as closed on device removal.
> > The GGTT will be rebuilt from scratch the next time we need to open it
> > (on binding a new device).
> 
> I'm still not sure if we really don't have to care about removing GGTT
> related mappings in any possible scenario, e.g., device unplug and re-
> plug vs. driver unbind and rebind to the same device still in place.   
> Trybot results look promising but as I said, I'm not sure so let me
> raise that point.

We control the contents of the GGTT and rewrite it upon takeover. It's
*our* translation table!
-Chris


More information about the Intel-gfx mailing list