Skip to content

Commit 5e83c06

Browse files
aalteresmattrope
authored andcommitted
drm/i915/guc: Flush context destruction worker at suspend
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> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Tested-by: Mousumi Jana <mousumi.jana@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231228045558.536585-2-alan.previn.teres.alexis@intel.com
1 parent a797099 commit 5e83c06

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1613,6 +1613,11 @@ static void guc_flush_submissions(struct intel_guc *guc)
16131613
spin_unlock_irqrestore(&sched_engine->lock, flags);
16141614
}
16151615

1616+
void intel_guc_submission_flush_work(struct intel_guc *guc)
1617+
{
1618+
flush_work(&guc->submission_state.destroyed_worker);
1619+
}
1620+
16161621
static void guc_flush_destroyed_contexts(struct intel_guc *guc);
16171622

16181623
void intel_guc_submission_reset_prepare(struct intel_guc *guc)

drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ int intel_guc_wait_for_pending_msg(struct intel_guc *guc,
3838
bool interruptible,
3939
long timeout);
4040

41+
void intel_guc_submission_flush_work(struct intel_guc *guc);
42+
4143
static inline bool intel_guc_submission_is_supported(struct intel_guc *guc)
4244
{
4345
return guc->submission_supported;

drivers/gpu/drm/i915/gt/uc/intel_uc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,8 @@ void intel_uc_suspend(struct intel_uc *uc)
690690
return;
691691
}
692692

693+
intel_guc_submission_flush_work(guc);
694+
693695
with_intel_runtime_pm(&uc_to_gt(uc)->i915->runtime_pm, wakeref) {
694696
err = intel_guc_suspend(guc);
695697
if (err)

0 commit comments

Comments
 (0)