From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Alan Previn <alan.previn.teres.alexis@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v3 1/3] drm/i915/guc: Flush context destruction worker at suspend
Date: Thu, 14 Sep 2023 11:35:41 -0400 [thread overview]
Message-ID: <ZQMoTW4iT/9AIJ8Q@intel.com> (raw)
In-Reply-To: <20230910035846.493766-2-alan.previn.teres.alexis@intel.com>
On Sat, Sep 09, 2023 at 08:58:44PM -0700, Alan Previn wrote:
> When suspending, flush the context-guc-id
> deregistration worker at the final stages of
> intel_gt_suspend_late when we finally call gt_sanitize
> that eventually leads down to __uc_sanitize so that
> the deregistration worker doesn't fire off later as
> we reset the GuC microcontroller.
>
> Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com>
> Tested-by: Mousumi Jana <mousumi.jana@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
> drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 5 +++++
> drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h | 2 ++
> drivers/gpu/drm/i915/gt/uc/intel_uc.c | 2 ++
> 3 files changed, 9 insertions(+)
>
> 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 cabdc645fcdd..0ed44637bca0 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> @@ -1578,6 +1578,11 @@ static void guc_flush_submissions(struct intel_guc *guc)
> spin_unlock_irqrestore(&sched_engine->lock, flags);
> }
>
> +void intel_guc_submission_flush_work(struct intel_guc *guc)
> +{
> + flush_work(&guc->submission_state.destroyed_worker);
> +}
> +
> static void guc_flush_destroyed_contexts(struct intel_guc *guc);
>
> void intel_guc_submission_reset_prepare(struct intel_guc *guc)
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h
> index c57b29cdb1a6..b6df75622d3b 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h
> @@ -38,6 +38,8 @@ int intel_guc_wait_for_pending_msg(struct intel_guc *guc,
> bool interruptible,
> long timeout);
>
> +void intel_guc_submission_flush_work(struct intel_guc *guc);
> +
> static inline bool intel_guc_submission_is_supported(struct intel_guc *guc)
> {
> return guc->submission_supported;
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> index 98b103375b7a..eb3554cb5ea4 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> @@ -693,6 +693,8 @@ void intel_uc_suspend(struct intel_uc *uc)
> return;
> }
>
> + intel_guc_submission_flush_work(guc);
> +
> with_intel_runtime_pm(&uc_to_gt(uc)->i915->runtime_pm, wakeref) {
> err = intel_guc_suspend(guc);
> if (err)
> --
> 2.39.0
>
next prev parent reply other threads:[~2023-09-14 15:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-10 3:58 [Intel-gfx] [PATCH v3 0/3] Resolve suspend-resume racing with GuC destroy-context-worker Alan Previn
2023-09-10 3:58 ` Alan Previn
2023-09-10 3:58 ` [Intel-gfx] [PATCH v3 1/3] drm/i915/guc: Flush context destruction worker at suspend Alan Previn
2023-09-10 3:58 ` Alan Previn
2023-09-14 15:35 ` Rodrigo Vivi [this message]
2023-09-22 16:54 ` [Intel-gfx] " Teres Alexis, Alan Previn
2023-09-10 3:58 ` [Intel-gfx] [PATCH v3 2/3] drm/i915/guc: Close deregister-context race against CT-loss Alan Previn
2023-09-10 3:58 ` Alan Previn
2023-09-14 15:34 ` [Intel-gfx] " Rodrigo Vivi
2023-09-22 18:02 ` Teres Alexis, Alan Previn
2023-09-23 4:00 ` Gupta, Anshuman
2023-09-26 17:19 ` Teres Alexis, Alan Previn
2023-09-26 18:21 ` Teres Alexis, Alan Previn
2023-09-10 3:58 ` [Intel-gfx] [PATCH v3 3/3] drm/i915/gt: Timeout when waiting for idle in suspending Alan Previn
2023-09-10 3:58 ` Alan Previn
2023-09-10 4:27 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Resolve suspend-resume racing with GuC destroy-context-worker (rev3) 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=ZQMoTW4iT/9AIJ8Q@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=alan.previn.teres.alexis@intel.com \
--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.