Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/selftests: Assert that the idle_pulse is sent
Date: Thu, 31 Oct 2019 15:34:08 +0200	[thread overview]
Message-ID: <874kzpkpin.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20191031094259.23028-1-chris@chris-wilson.co.uk>

Chris Wilson <chris@chris-wilson.co.uk> writes:

> When checking the heartbeat pulse, we expect it to have been sent by the
> time we have slept. We can verify this by checking the engine serial
> number to see if that matches the predicted pulse serial. It will always
> be true if, and only if, the pulse was sent by itself (as designed by
> the test).
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c b/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c
> index 9e7376b592e5..07a2fffe16a1 100644
> --- a/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c
> +++ b/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c
> @@ -97,6 +97,8 @@ static int __live_idle_pulse(struct intel_engine_cs *engine,
>  		goto out;
>  	}
>  
> +	GEM_BUG_ON(READ_ONCE(engine->serial) != engine->wakeref_serial);
> +

Yes the wakeref_serial seems to be our local copy.

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

The extra space on starting the subtests, at the end of
the file, caught my eye.

>  	pulse_unlock_wait(p); /* synchronize with the retirement callback */
>  
>  	if (!i915_active_is_idle(&p->active)) {
> -- 
> 2.24.0.rc1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/selftests: Assert that the idle_pulse is sent
Date: Thu, 31 Oct 2019 15:34:08 +0200	[thread overview]
Message-ID: <874kzpkpin.fsf@gaia.fi.intel.com> (raw)
Message-ID: <20191031133408.-MHvpYwyB-MajnyG52EVDvhzz2yXnFrMxaL2NGntUg0@z> (raw)
In-Reply-To: <20191031094259.23028-1-chris@chris-wilson.co.uk>

Chris Wilson <chris@chris-wilson.co.uk> writes:

> When checking the heartbeat pulse, we expect it to have been sent by the
> time we have slept. We can verify this by checking the engine serial
> number to see if that matches the predicted pulse serial. It will always
> be true if, and only if, the pulse was sent by itself (as designed by
> the test).
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c b/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c
> index 9e7376b592e5..07a2fffe16a1 100644
> --- a/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c
> +++ b/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c
> @@ -97,6 +97,8 @@ static int __live_idle_pulse(struct intel_engine_cs *engine,
>  		goto out;
>  	}
>  
> +	GEM_BUG_ON(READ_ONCE(engine->serial) != engine->wakeref_serial);
> +

Yes the wakeref_serial seems to be our local copy.

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

The extra space on starting the subtests, at the end of
the file, caught my eye.

>  	pulse_unlock_wait(p); /* synchronize with the retirement callback */
>  
>  	if (!i915_active_is_idle(&p->active)) {
> -- 
> 2.24.0.rc1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-10-31 13:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-31  9:42 [PATCH] drm/i915/selftests: Assert that the idle_pulse is sent Chris Wilson
2019-10-31  9:42 ` [Intel-gfx] " Chris Wilson
2019-10-31  9:42 ` Chris Wilson
2019-10-31  9:42   ` [Intel-gfx] " Chris Wilson
2019-10-31 13:34   ` Mika Kuoppala [this message]
2019-10-31 13:34     ` Mika Kuoppala
2019-10-31 10:26 ` ✓ Fi.CI.BAT: success for drm/i915/selftests: Assert that the idle_pulse is sent (rev2) Patchwork
2019-10-31 10:26   ` [Intel-gfx] " Patchwork
2019-11-01 10:07 ` ✓ Fi.CI.IGT: " Patchwork
2019-11-01 10:07   ` [Intel-gfx] " Patchwork

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=874kzpkpin.fsf@gaia.fi.intel.com \
    --to=mika.kuoppala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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