Re: [PATCH v2 37/38] drm/i915: Add mock exercise for i915_gem_gtt_insert

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <chris@xxxxxxxxxxxxxxxxxx>

<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 <joonas.lahtinen@xxxxxxxxxxxxxxx>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux