On Thu, 29 Mar 2012 21:29:05 +0200, Daniel Vetter <daniel at ffwll.ch> wrote: > On Sun, Mar 18, 2012 at 01:39:51PM -0700, Ben Widawsky wrote: > > To keep things as sane as possible, switch to the default context before > > idling. This should help free context objects, as well as put things in > > a more well defined state before suspending. > > > > Signed-off-by: Ben Widawsky <ben at bwidawsk.net> > > Context are yet another thing that will nicely fragment our global gtt > space. You don't pin them to mappable, which is a start, but I wonder > whether we should integrate this into our evict_something code? Although > that project is more involved with the current evict code, so maybe just > add a fixme. My suggestion for when we want to step beyond having the context pinned all the time was for a hook into unbind that checked to see if this was a "pinned" object and to fixup any registers to point back to the default. In the case of contexts, it would check a flag to see if it was indeed the active context and then schedule a change back to the default context prior to unbinding. From another viewpoint, this sounds alot like fences, and maybe we should add the tracking to the CXTID register in a similar manner. -Chris -- Chris Wilson, Intel Open Source Technology Centre