public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [Intel-gfx] [PATCH i-g-t] i915/gem_exec_balancer: Check for bonding support before exercising
Date: Wed, 1 Apr 2020 15:12:57 +0100	[thread overview]
Message-ID: <6575932f-0ca5-f620-fbb1-c0c61ba471a7@linux.intel.com> (raw)
In-Reply-To: <20200331103623.859601-1-chris@chris-wilson.co.uk>


On 31/03/2020 11:36, Chris Wilson wrote:
> Don't bother trying and failing to test bonding if the kernel doesn't
> even support it.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Andi Shyti <andi.shyti@intel.com>
> ---
>   tests/i915/gem_exec_balancer.c | 34 +++++++++++++++++++++++++++-------
>   1 file changed, 27 insertions(+), 7 deletions(-)
> 
> diff --git a/tests/i915/gem_exec_balancer.c b/tests/i915/gem_exec_balancer.c
> index da8aff6de..9930e394d 100644
> --- a/tests/i915/gem_exec_balancer.c
> +++ b/tests/i915/gem_exec_balancer.c
> @@ -1936,6 +1936,22 @@ static bool has_load_balancer(int i915)
>   	return err == 0;
>   }
>   
> +static bool has_bonding(int i915)
> +{
> +	I915_DEFINE_CONTEXT_ENGINES_BOND(bonds, 0) = {
> +		.base.name = I915_CONTEXT_ENGINES_EXT_BOND,
> +	};

Doh why do we allow zero bonds.. to make for an easier probe of course! :))

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko

> +	struct i915_engine_class_instance ci = {};
> +	uint32_t ctx;
> +	int err;
> +
> +	ctx = gem_context_create(i915);
> +	err = __set_load_balancer(i915, ctx, &ci, 1, &bonds);
> +	gem_context_destroy(i915, ctx);
> +
> +	return err == 0;
> +}
> +
>   igt_main
>   {
>   	int i915 = -1;
> @@ -1992,11 +2008,18 @@ igt_main
>   	igt_subtest("smoke")
>   		smoketest(i915, 20);
>   
> -	igt_subtest("bonded-imm")
> -		bonded(i915, 0);
> +	igt_subtest_group {
> +		igt_fixture igt_require(has_bonding(i915));
> +
> +		igt_subtest("bonded-imm")
> +			bonded(i915, 0);
> +
> +		igt_subtest("bonded-cork")
> +			bonded(i915, CORK);
>   
> -	igt_subtest("bonded-cork")
> -		bonded(i915, CORK);
> +		igt_subtest("bonded-early")
> +			bonded_early(i915);
> +	}
>   
>   	igt_subtest("bonded-slice")
>   		bonded_slice(i915);
> @@ -2007,9 +2030,6 @@ igt_main
>   	igt_subtest("bonded-semaphore")
>   		bonded_semaphore(i915);
>   
> -	igt_subtest("bonded-early")
> -		bonded_early(i915);
> -
>   	igt_fixture {
>   		igt_stop_hang_detector();
>   	}
> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

      parent reply	other threads:[~2020-04-01 14:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-31 10:36 [igt-dev] [PATCH i-g-t] i915/gem_exec_balancer: Check for bonding support before exercising Chris Wilson
2020-03-31 11:55 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2020-04-01 14:12 ` Tvrtko Ursulin [this message]

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=6575932f-0ca5-f620-fbb1-c0c61ba471a7@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=igt-dev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox