Re: [PATCH 34/34] drm: kselftest for drm_mm and bottom-up allocation

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

 



On ma, 2016-12-12 at 11:53 +0000, Chris Wilson wrote:
> Check that if we request bottom-up allocation from drm_mm_insert_node()
> we receive the next available hole from the bottom.
> 
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>

<SNIP>

> @@ -1304,6 +1304,95 @@ static int igt_topdown(void *ignored)
> >  	return ret;
>  }
>  
> +static int igt_bottomup(void *ignored)
> +{

<SNIP>

> +	drm_mm_init(&mm, 0, size);
> +	for (n = 0; n < size; n++) {
> +		int err;
> +
> +		err = drm_mm_insert_node_generic(&mm, &nodes[n], 1, 0, 0,
> +						 DRM_MM_INSERT_LOW);
> +		if (err) {
> +			pr_err("bottomup insert failed, step %d\n", n);
> +			ret = err;
> +			goto out;
> +		}
> +
> +		if (nodes[n].hole_size) {

Should really be if (nodes[n].hole_size != size - n) and
pr_err("incorrect hole...");

With that fixed;

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