From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/9] drm: kselftest for drm_mm_reserve_node()
Date: Fri, 09 Dec 2016 16:31:50 +0200 [thread overview]
Message-ID: <1481293910.3210.8.camel@linux.intel.com> (raw)
In-Reply-To: <20161209130825.6854-2-chris@chris-wilson.co.uk>
On pe, 2016-12-09 at 13:08 +0000, Chris Wilson wrote:
> Exercise drm_mm_reserve_node(), check that we can't reserve an already
> occupied range and that the lists are correct after reserving/removing.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> drivers/gpu/drm/drm_mm_selftests.h | 1 +
> drivers/gpu/drm/test-drm_mm.c | 143 +++++++++++++++++++++++++++++++++++++
Once there is more thorough coverage, I think we should have
drm/selftest/drm_mm.{h,c}
> +static int __igt_reserve(int count, u64 size)
> +{
> + struct drm_mm mm;
> + struct drm_mm_node *node, *next;
> + int *order, n;
> + int ret;
> +
> + /* Fill a range with lots of nodes, check it doesn't fail too early */
> +
> + ret = -ENOMEM;
> + order = random_order(count);
> + if (!order)
> + goto err;
> +
> + ret = -EINVAL;
> + drm_mm_init(&mm, 0, count * size);
> + if (!drm_mm_clean(&mm)) {
> + pr_err("mm not empty on creation\n");
> + goto out;
> + }
This code gets covered already done in more basic test, I think we
should avoid duplication from the start as we now have trouble with
runtime of tests.
> +static int igt_reserve(void *ignored)
> +{
> + int n, ret;
> +
> + for (n = 1; n < 50; n++) {
The right amount of loops might be something to discuss.
> + ret = __igt_reserve(8192, (1ull << n) - 1);
BIT_ULL(n) - 1?
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-12-09 14:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-09 13:08 [PATCH 1/9] drm: kselftest for drm_mm_init() Chris Wilson
2016-12-09 13:08 ` [PATCH 2/9] drm: kselftest for drm_mm_reserve_node() Chris Wilson
2016-12-09 14:31 ` Joonas Lahtinen [this message]
2016-12-09 14:43 ` Chris Wilson
2016-12-09 13:08 ` [PATCH 3/9] drm: kselftest for drm_mm_insert_node() Chris Wilson
2016-12-09 13:08 ` [PATCH 4/9] drm: kselftest for drm_mm_insert_node_in_range() Chris Wilson
2016-12-09 13:08 ` [PATCH 5/9] drm: kselftest for drm_mm and alignment Chris Wilson
2016-12-09 16:14 ` Joonas Lahtinen
2016-12-09 13:08 ` [PATCH 6/9] drm: kselftest for drm_mm and eviction Chris Wilson
2016-12-09 13:08 ` [PATCH 7/9] drm: kselftest for drm_mm and top-down allocation Chris Wilson
2016-12-09 13:08 ` [PATCH 8/9] drm: kselftest for drm_mm and top-down alignment Chris Wilson
2016-12-09 15:41 ` Joonas Lahtinen
2016-12-09 13:08 ` [PATCH 9/9] drm: kselftest for drm_mm and color adjustment Chris Wilson
2016-12-09 13:46 ` [PATCH 1/9] drm: kselftest for drm_mm_init() Joonas Lahtinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1481293910.3210.8.camel@linux.intel.com \
--to=joonas.lahtinen@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.