From: Raag Jadav <raag.jadav@intel.com>
To: lucas.demarchi@intel.com, rodrigo.vivi@intel.com
Cc: intel-xe@lists.freedesktop.org, riana.tauro@intel.com,
daniele.ceraolospurio@intel.com, matthew.brost@intel.com,
michal.wajdeczko@intel.com, badal.nilawar@intel.com,
Raag Jadav <raag.jadav@intel.com>
Subject: [PATCH v6 2/4] drm/xe/guc_submit: Bring back pause/unpause() helpers
Date: Wed, 22 Oct 2025 15:12:44 +0530 [thread overview]
Message-ID: <20251022094246.3584785-3-raag.jadav@intel.com> (raw)
In-Reply-To: <20251022094246.3584785-1-raag.jadav@intel.com>
In preparation of non-VF usecases which require stopping/starting
submission on GuC, bring back original pause/unpause() helpers.
Signed-off-by: Raag Jadav <raag.jadav@intel.com>
---
drivers/gpu/drm/xe/xe_guc_submit.c | 30 ++++++++++++++++++++++++++++++
drivers/gpu/drm/xe/xe_guc_submit.h | 2 ++
2 files changed, 32 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
index 8fbb6b27095d..62771d5c1d91 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@ -2161,6 +2161,21 @@ static void guc_exec_queue_pause(struct xe_guc *guc, struct xe_exec_queue *q)
}
}
+/**
+ * xe_guc_submit_pause - Stop further runs of submission tasks on given GuC.
+ * @guc: the &xe_guc struct instance whose scheduler is to be disabled
+ */
+void xe_guc_submit_pause(struct xe_guc *guc)
+{
+ struct xe_exec_queue *q;
+ unsigned long index;
+
+ mutex_lock(&guc->submission_state.lock);
+ xa_for_each(&guc->submission_state.exec_queue_lookup, index, q)
+ xe_sched_submission_stop(&q->guc->sched);
+ mutex_unlock(&guc->submission_state.lock);
+}
+
/**
* xe_guc_submit_vf_pause - Stop further runs of submission tasks for VF.
* @guc: the &xe_guc struct instance whose scheduler is to be disabled
@@ -2333,6 +2348,21 @@ static void guc_exec_queue_unpause(struct xe_guc *guc, struct xe_exec_queue *q)
xe_sched_submission_resume_tdr(sched);
}
+/**
+ * xe_guc_submit_unpause - Allow further runs of submission tasks on given GuC.
+ * @guc: the &xe_guc struct instance whose scheduler is to be enabled
+ */
+void xe_guc_submit_unpause(struct xe_guc *guc)
+{
+ struct xe_exec_queue *q;
+ unsigned long index;
+
+ mutex_lock(&guc->submission_state.lock);
+ xa_for_each(&guc->submission_state.exec_queue_lookup, index, q)
+ xe_sched_submission_start(&q->guc->sched);
+ mutex_unlock(&guc->submission_state.lock);
+}
+
/**
* xe_guc_submit_vf_unpause - Allow further runs of submission tasks for VF.
* @guc: the &xe_guc struct instance whose scheduler is to be enabled
diff --git a/drivers/gpu/drm/xe/xe_guc_submit.h b/drivers/gpu/drm/xe/xe_guc_submit.h
index cb5cc2cc9497..8057a4b71ff3 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.h
+++ b/drivers/gpu/drm/xe/xe_guc_submit.h
@@ -20,7 +20,9 @@ int xe_guc_submit_reset_prepare(struct xe_guc *guc);
void xe_guc_submit_reset_wait(struct xe_guc *guc);
void xe_guc_submit_stop(struct xe_guc *guc);
int xe_guc_submit_start(struct xe_guc *guc);
+void xe_guc_submit_pause(struct xe_guc *guc);
void xe_guc_submit_pause_abort(struct xe_guc *guc);
+void xe_guc_submit_unpause(struct xe_guc *guc);
void xe_guc_submit_vf_pause(struct xe_guc *guc);
void xe_guc_submit_vf_unpause(struct xe_guc *guc);
void xe_guc_submit_vf_unpause_prepare(struct xe_guc *guc);
--
2.34.1
next prev parent reply other threads:[~2025-10-22 9:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-22 9:42 [PATCH v6 0/4] Introduce GT runtime suspend/resume Raag Jadav
2025-10-22 9:42 ` [PATCH v6 1/4] drm/xe/vf: Update pause/unpause() helpers with VF naming Raag Jadav
2025-10-22 15:23 ` Matthew Brost
2025-10-22 17:01 ` Raag Jadav
2025-10-22 17:16 ` Matthew Brost
2025-10-22 15:29 ` Michal Wajdeczko
2025-10-22 9:42 ` Raag Jadav [this message]
2025-10-22 15:31 ` [PATCH v6 2/4] drm/xe/guc_submit: Bring back pause/unpause() helpers Matthew Brost
2025-10-22 9:42 ` [PATCH v6 3/4] drm/xe/pm: Assert on runtime suspend if VFs are enabled Raag Jadav
2025-10-22 9:42 ` [PATCH v6 4/4] drm/xe/gt: Introduce runtime suspend/resume Raag Jadav
2025-10-22 15:38 ` Matthew Brost
2025-10-22 12:36 ` ✓ CI.KUnit: success for Introduce GT runtime suspend/resume (rev4) Patchwork
2025-10-22 14:00 ` ✗ Xe.CI.BAT: failure " Patchwork
2025-10-22 15:38 ` ✗ 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=20251022094246.3584785-3-raag.jadav@intel.com \
--to=raag.jadav@intel.com \
--cc=badal.nilawar@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