[Intel-gfx] [PATCH 28/37] drm/i915: Exercising filling the top/bottom portions of the global GTT

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Thu Jan 12 14:05:38 UTC 2017


On ke, 2017-01-11 at 21:09 +0000, Chris Wilson wrote:
> Same test as previously for the per-process GTT instead applied to the
> global GTT.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

<SNIP>

> @@ -218,28 +209,94 @@ static int igt_ppgtt_fill(void *arg)
>  
>  		list_for_each_entry_safe(obj, on, &objects, batch_pool_link) {
>  			list_del(&obj->batch_pool_link);
> -			vma = vma_lookup(obj, &ppgtt->base);
> -			if (!IS_ERR(vma))
> +			vma = vma_lookup(obj, vm);
> +			if (!IS_ERR(vma) && !i915_vma_is_ggtt(vma))

Reasoning is worthy a commenting here as discussed in IRC.

>  				i915_vma_close(vma);
>  
>  			i915_gem_object_put(obj);
>  		}
>  	}
> -err:

<SNIP>

> +static int igt_ggtt_fill(void *arg)
> +{

<SNIP>

> +	mutex_lock(&i915->drm.struct_mutex);
> +	drm_mm_for_each_hole(node, &ggtt->base.mm, this_start, this_end) {
> +		u64 this_size;
> +
> +		if (ggtt->base.mm.color_adjust)
> +			ggtt->base. mm.color_adjust(node, 0,

You somehow managed to add space --^ 

Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation


More information about the Intel-gfx mailing list