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

Daniel Vetter daniel at ffwll.ch
Thu Dec 5 16:19:21 CET 2013


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. Jon Bloomfield just pointed out that issue in an
internal mail with their evict_everything sledgehammer. Also can you
please check whether this fixes the test I've just pushed out? Also
please check that the test exercise the endless looping.

Finally we should also have a testcase for outstanding flips, and I
think it's worth it to split the flip-related changes in gpu_idle out
into a separate patch.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list