[Intel-gfx] [PATCH 17/34] drm: kselftest for drm_mm and color adjustment

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Thu Dec 15 11:04:13 UTC 2016


On ma, 2016-12-12 at 11:53 +0000, Chris Wilson wrote:
> Check that after applying the driver's color adjustment, fitting of the
> node and its alignment are still correct.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

<SNIP>

> +static void no_color_touching(struct drm_mm_node *node,
> +			      unsigned long color,
> +			      u64 *start,
> +			      u64 *end)

Function name made me think of a bool returning one.

Rather call it "{separate,space}_adjacent_colors" or so.

> +{
> +	if (node->allocated && node->color != color)
> +		++*start;
> +
> +	node = list_next_entry(node, node_list);
> +	if (node->allocated && node->color != color)
> +		--*end;
> +}
> +
> +static int igt_color(void *ignored)
> +{

<SNIP>

> +				node->start += n + 1;
> +			rem = node->start;
> +			rem %= n + count;

rem = div64...?

If I could keep with the loop variables, should be good;

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