[PATCH v2 21/40] drm: kselftest for drm_mm and restricted color eviction

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Fri Dec 16 14:41:02 UTC 2016


On pe, 2016-12-16 at 07:46 +0000, Chris Wilson wrote:
> Check that after applying the driver's color adjustment, restricted
> eviction scanning find a suitable hole.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

<SNIP> 

> +static int igt_color_evict_range(void *ignored)
> +{

<SNIP>

> +	for (mode = evict_modes; mode->name; mode++) {
> +		for (n = 1; n <= range_size; n <<= 1) {
> +			drm_random_reorder(order, range_size, &prng);
> +			err = evict_color(&mm, range_start, range_end,
> +					  nodes, order, total_size,
> +					  n, 1, color++,
> +					  mode);
> +			if (err) {
> +				pr_err("%s evict_color(size=%u) failed for range [%x, %x]\n",
> +				       mode->name, n, range_start, range_end);
> +				goto out;
> +			}

This evict_color + error check again repeats, could maybe be helper.

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

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


More information about the dri-devel mailing list