[Intel-gfx] [PATCH] drm/i915: When evicting something fails, try unpinning old contexts and framebuffers

Chris Wilson chris at chris-wilson.co.uk
Thu Dec 5 16:25:04 CET 2013


On Thu, Dec 05, 2013 at 04:19:21PM +0100, Daniel Vetter wrote:
> On Thu, Dec 5, 2013 at 4:14 PM, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> > @@ -115,10 +116,14 @@ none:
> >                 list_del_init(&vma->exec_list);
> >         }
> >
> > -       /* We expect the caller to unpin, evict all and try again, or give up.
> > -        * So calling i915_gem_evict_vm() is unnecessary.
> > +       /* Can we unpin some objects such as idle hw contents,
> > +        * or pending flips?
> >          */
> > -       return -ENOSPC;
> > +       ret = nonblocking ? -ENOSPC : i915_gpu_idle(dev);
> > +       if (ret)
> > +               return ret;
> > +
> > +       goto search_again;
> 
> We need to make sure that we only try to do this once, for otherwise
> we spin forever. 

For sure. I had intended to do a if (pinned) do_idle(), but lost that
track of thought when adding wait_for_flips. Too overexcited. Back to
tracking damage.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list