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
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Subject: Re: [Intel-gfx] [PATCH v3 1/3] drm/i915/selftests: Restore previous heartbeat interval
Date: Thu, 04 Feb 2021 14:45:25 +0200	[thread overview]
Message-ID: <8735ycuhlm.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20210204110620.32422-1-chris@chris-wilson.co.uk>

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

> Use the defaults we store on the engine when resetting the heartbeat as
> we may have had to adjust it from the config value during initialisation.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

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

> ---
>  .../gpu/drm/i915/gt/selftest_engine_heartbeat.c    | 14 ++++++++++----
>  1 file changed, 10 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c b/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c
> index b0bae6676140..b2c369317bf1 100644
> --- a/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c
> +++ b/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c
> @@ -11,6 +11,12 @@
>  #include "i915_selftest.h"
>  #include "selftest_engine_heartbeat.h"
>  
> +static void reset_heartbeat(struct intel_engine_cs *engine)
> +{
> +	intel_engine_set_heartbeat(engine,
> +				   engine->defaults.heartbeat_interval_ms);
> +}
> +
>  static int timeline_sync(struct intel_timeline *tl)
>  {
>  	struct dma_fence *fence;
> @@ -269,7 +275,7 @@ static int __live_heartbeat_fast(struct intel_engine_cs *engine)
>  		err = -EINVAL;
>  	}
>  
> -	intel_engine_set_heartbeat(engine, CONFIG_DRM_I915_HEARTBEAT_INTERVAL);
> +	reset_heartbeat(engine);
>  err_pm:
>  	intel_engine_pm_put(engine);
>  	intel_context_put(ce);
> @@ -284,7 +290,7 @@ static int live_heartbeat_fast(void *arg)
>  	int err = 0;
>  
>  	/* Check that the heartbeat ticks at the desired rate. */
> -	if (!CONFIG_DRM_I915_HEARTBEAT_INTERVAL)
> +	if (!IS_ACTIVE(CONFIG_DRM_I915_HEARTBEAT_INTERVAL))
>  		return 0;
>  
>  	for_each_engine(engine, gt, id) {
> @@ -332,7 +338,7 @@ static int __live_heartbeat_off(struct intel_engine_cs *engine)
>  	}
>  
>  err_beat:
> -	intel_engine_set_heartbeat(engine, CONFIG_DRM_I915_HEARTBEAT_INTERVAL);
> +	reset_heartbeat(engine);
>  err_pm:
>  	intel_engine_pm_put(engine);
>  	return err;
> @@ -346,7 +352,7 @@ static int live_heartbeat_off(void *arg)
>  	int err = 0;
>  
>  	/* Check that we can turn off heartbeat and not interrupt VIP */
> -	if (!CONFIG_DRM_I915_HEARTBEAT_INTERVAL)
> +	if (!IS_ACTIVE(CONFIG_DRM_I915_HEARTBEAT_INTERVAL))
>  		return 0;
>  
>  	for_each_engine(engine, gt, id) {
> -- 
> 2.20.1
>
> _______________________________________________
> 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:[~2021-02-04 12:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04 11:06 [Intel-gfx] [PATCH v3 1/3] drm/i915/selftests: Restore previous heartbeat interval Chris Wilson
2021-02-04 11:06 ` [Intel-gfx] [PATCH v3 2/3] drm/i915/gt: Double check heartbeat timeout before resetting Chris Wilson
2021-02-04 12:57   ` Mika Kuoppala
2021-02-04 13:02     ` Chris Wilson
2021-02-04 11:06 ` [Intel-gfx] [PATCH v3 3/3] drm/i915/gt: Ratelimit heartbeat completion probing Chris Wilson
2021-02-04 12:45 ` Mika Kuoppala [this message]
2021-02-04 17:12 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [v3,1/3] drm/i915/selftests: Restore previous heartbeat interval 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=8735ycuhlm.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