From: Raag Jadav <raag.jadav@intel.com>
To: Matthew Brost <matthew.brost@intel.com>
Cc: lucas.demarchi@intel.com, rodrigo.vivi@intel.com,
intel-xe@lists.freedesktop.org, riana.tauro@intel.com,
daniele.ceraolospurio@intel.com, michal.wajdeczko@intel.com
Subject: Re: [PATCH v5 1/2] drm/xe/guc: Make xe_guc_submit_pause() available for non-VF cases
Date: Thu, 16 Oct 2025 14:21:09 +0200 [thread overview]
Message-ID: <aPDjNWORoOC7SccI@black.igk.intel.com> (raw)
In-Reply-To: <aO9Hbfo06ZrVShss@black.igk.intel.com>
On Wed, Oct 15, 2025 at 09:04:18AM +0200, Raag Jadav wrote:
> On Tue, Oct 14, 2025 at 11:09:19AM -0700, Matthew Brost wrote:
> > On Tue, Oct 14, 2025 at 01:00:35PM +0530, Raag Jadav wrote:
> > > Drop xe_gt_assert() meant for VF migration and make xe_guc_submit_pause()
> > > available for non-VF cases.
> > >
> > > Signed-off-by: Raag Jadav <raag.jadav@intel.com>
> > > ---
> > > drivers/gpu/drm/xe/xe_guc_submit.c | 2 --
> > > 1 file changed, 2 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
> > > index 0ef67d3523a7..3cc428d45b4a 100644
> > > --- a/drivers/gpu/drm/xe/xe_guc_submit.c
> > > +++ b/drivers/gpu/drm/xe/xe_guc_submit.c
> > > @@ -2170,8 +2170,6 @@ void xe_guc_submit_pause(struct xe_guc *guc)
> > > struct xe_exec_queue *q;
> > > unsigned long index;
> > >
> > > - xe_gt_assert(guc_to_gt(guc), vf_recovery(guc));
> > > -
> >
> > This function does a lot of things specific to VF recovery, it should
> > not be called in runtime PM flows. Same goes for xe_guc_submit_unpause.
>
> Can we branch them out inside pause/unpause()? Or is there a better
> alternative?
>
> Considering we'd still like to achieve the original pause/unpause()
> behaviour here (stop/start submission on a scheduler without loosing
> GuC state), do you suspect any side-effects?
I came up with something like this, but not sure if this is correct way
to do this. Let me know what you think.
diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
index 0ef67d3523a7..8ee6069abe99 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@ -2127,6 +2127,11 @@ static void guc_exec_queue_pause(struct xe_guc *guc, struct xe_exec_queue *q)
/* Stop scheduling + flush any DRM scheduler operations */
xe_sched_submission_stop(sched);
+
+ /* Non-VF cases don't need migration */
+ if (!IS_SRIOV_VF(guc_to_xe(guc)))
+ return;
+
if (xe_exec_queue_is_lr(q))
cancel_work_sync(&q->guc->lr_tdr);
else
@@ -2170,8 +2175,6 @@ void xe_guc_submit_pause(struct xe_guc *guc)
struct xe_exec_queue *q;
unsigned long index;
- xe_gt_assert(guc_to_gt(guc), vf_recovery(guc));
-
mutex_lock(&guc->submission_state.lock);
xa_for_each(&guc->submission_state.exec_queue_lookup, index, q) {
/* Prevent redundant attempts to stop parallel queues */
@@ -2325,6 +2328,12 @@ static void guc_exec_queue_unpause(struct xe_guc *guc, struct xe_exec_queue *q)
lockdep_assert_held(&guc->submission_state.lock);
+ /* Non-VF cases don't need migration */
+ if (!IS_SRIOV_VF(guc_to_xe(guc))) {
+ xe_sched_submission_start(sched);
+ return;
+ }
+
xe_sched_resubmit_jobs(sched);
guc_exec_queue_replay_pending_state_change(q);
xe_sched_submission_start(sched);
next prev parent reply other threads:[~2025-10-16 12:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-14 7:30 [PATCH v5 0/2] Introduce GT runtime suspend/resume Raag Jadav
2025-10-14 7:30 ` [PATCH v5 1/2] drm/xe/guc: Make xe_guc_submit_pause() available for non-VF cases Raag Jadav
2025-10-14 18:09 ` Matthew Brost
2025-10-15 7:04 ` Raag Jadav
2025-10-16 12:21 ` Raag Jadav [this message]
2025-10-16 19:01 ` Matthew Brost
2025-10-14 7:30 ` [PATCH v5 2/2] drm/xe/gt: Introduce runtime suspend/resume Raag Jadav
2025-10-16 15:32 ` Daniele Ceraolo Spurio
2025-10-16 18:38 ` Matthew Brost
2025-10-16 18:47 ` Daniele Ceraolo Spurio
2025-10-20 11:48 ` Raag Jadav
2025-10-14 7:42 ` ✓ CI.KUnit: success for Introduce GT runtime suspend/resume (rev2) Patchwork
2025-10-14 8:19 ` ✓ Xe.CI.BAT: " Patchwork
2025-10-14 15:40 ` ✗ Xe.CI.Full: failure " Patchwork
2025-10-16 13:03 ` ✗ CI.checkpatch: warning for Introduce GT runtime suspend/resume (rev3) Patchwork
2025-10-16 13:04 ` ✓ CI.KUnit: success " Patchwork
2025-10-16 14:08 ` ✓ Xe.CI.BAT: " Patchwork
2025-10-17 9:43 ` ✓ Xe.CI.Full: " 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=aPDjNWORoOC7SccI@black.igk.intel.com \
--to=raag.jadav@intel.com \
--cc=daniele.ceraolospurio@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=matthew.brost@intel.com \
--cc=michal.wajdeczko@intel.com \
--cc=riana.tauro@intel.com \
--cc=rodrigo.vivi@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