On to, 2017-01-19 at 11:41 +0000, Chris Wilson wrote:
> i915_gem_gtt_insert should allocate from the available free space in the
> GTT, evicting as necessary to create space.
>
> Signed-off-by: Chris Wilson <[email protected]>
<SNIP>
> + list_add(&obj->batch_pool_link, &objects);
Still dislike the obscurity. The least you could do is make a comment
on abusing the variable.
> +
> + /* And then force evictions */
> + for (total = 0;
> + total + 2*I915_GTT_PAGE_SIZE <= i915->ggtt.base.total;
> + total += 2*I915_GTT_PAGE_SIZE) {
> + struct i915_vma *vma;
<SNIP>
> + err = i915_gem_gtt_insert(&i915->ggtt.base, &vma->node,
> + obj->base.size, 0, obj->cache_level,
> + 0, i915->ggtt.base.total,
> + 0);
> + if (err) {
> + pr_err("i915_gem_gtt_insert (pass 1) failed at
> %llu/%llu with err=%d\n",
pass 3?
Reviewed-by: Joonas Lahtinen <[email protected]>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx