Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: John Harrison <john.c.harrison@intel.com>
To: "Nerlige Ramappa, Umesh" <umesh.nerlige.ramappa@intel.com>,
	<intel-gfx@lists.freedesktop.org>,
	Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/guc: Cancel GuC engine busyness worker synchronously
Date: Wed, 27 Jul 2022 18:41:59 -0700	[thread overview]
Message-ID: <cdc96e29-d40b-090d-6ed0-1f08ff43ca17@intel.com> (raw)
In-Reply-To: <20220726205116.3148847-1-umesh.nerlige.ramappa@intel.com>

On 7/26/2022 13:51, Nerlige Ramappa, Umesh wrote:
> The worker is canceled in gt_park path, but earlier it was assumed that
> gt_park path cannot sleep and the cancel is asynchronous. This caused a
> race with suspend flow where the worker runs after suspend and causes an
> unclaimed register access warning. Cancel the worker synchronously since
> the gt_park is indeed allowed to sleep.
>
> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
> Fixes: 77cdd054dd2c ("drm/i915/pmu: Connect engine busyness stats from GuC to pmu")
Reviewed-by: John Harrison <John.C.Harrison@Intel.com>

> ---
>   drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> index 76916aed897a..0b7a5ecb640a 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> @@ -1438,7 +1438,12 @@ void intel_guc_busyness_park(struct intel_gt *gt)
>   	if (!guc_submission_initialized(guc))
>   		return;
>   
> -	cancel_delayed_work(&guc->timestamp.work);
> +	/*
> +	 * There is a race with suspend flow where the worker runs after suspend
> +	 * and causes an unclaimed register access warning. Cancel the worker
> +	 * synchronously here.
> +	 */
> +	cancel_delayed_work_sync(&guc->timestamp.work);
>   
>   	/*
>   	 * Before parking, we should sample engine busyness stats if we need to.


  parent reply	other threads:[~2022-07-28  1:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-26 20:51 [Intel-gfx] [PATCH] drm/i915/guc: Cancel GuC engine busyness worker synchronously Nerlige Ramappa, Umesh
2022-07-26 21:15 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2022-07-26 21:38 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2022-07-28  1:41 ` John Harrison [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-08-26 23:28 [Intel-gfx] [PATCH] " Umesh Nerlige Ramappa
2022-08-27  0:21 Umesh Nerlige Ramappa
2022-09-05 21:30 ` Dixit, Ashutosh

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=cdc96e29-d40b-090d-6ed0-1f08ff43ca17@intel.com \
    --to=john.c.harrison@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tvrtko.ursulin@linux.intel.com \
    --cc=umesh.nerlige.ramappa@intel.com \
    /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