[Intel-gfx] [PATCH 13/34] drm: kselftest for drm_mm and eviction

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Thu Dec 15 09:29:21 UTC 2016


On ma, 2016-12-12 at 11:53 +0000, Chris Wilson wrote:
> Check that we add arbitrary blocks to the eviction scanner in order to
> find the first minimal hole that matches our request.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

<SNIP>

> +		if ((int)tmp.start % n || tmp.size != nsize || tmp.hole_follows) {
> +			pr_err("Inserted did not fill the eviction hole: size=%lld [%d], align=%d [rem=%d] (prime), start=%llx, hole-follows?=%d\n",
> +			       tmp.size, nsize, n, (int)tmp.start % n, tmp.start, tmp.hole_follows);
> +
> +			drm_mm_remove_node(&tmp);
> +			goto out;
> +		}
> +
> +		drm_mm_remove_node(&tmp);
> +		list_for_each_entry(e, &evict_list, link) {
> +			err = drm_mm_reserve_node(&mm, &e->node);

Using helpers, could repeat the ordering tests for reserve vs insert.

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