Skip to content

Commit ebd546f

Browse files
author
Thomas Hellström
committed
drm/xe: Allow the pm notifier to continue on failure
Its actions are opportunistic anyway and will be completed on device suspend. Marking as a fix to simplify backporting of the fix that follows in the series. v2: - Keep the runtime pm reference over suspend / hibernate and document why. (Matt Auld, Rodrigo Vivi): Fixes: c6a4d46 ("drm/xe: evict user memory in PM notifier") Cc: Matthew Auld <matthew.auld@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: <stable@vger.kernel.org> # v6.16+ Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://lore.kernel.org/r/20250904160715.2613-3-thomas.hellstrom@linux.intel.com
1 parent cb3d7b3 commit ebd546f

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

drivers/gpu/drm/xe/xe_pm.c

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -312,17 +312,17 @@ static int xe_pm_notifier_callback(struct notifier_block *nb,
312312
case PM_SUSPEND_PREPARE:
313313
xe_pm_runtime_get(xe);
314314
err = xe_bo_evict_all_user(xe);
315-
if (err) {
315+
if (err)
316316
drm_dbg(&xe->drm, "Notifier evict user failed (%d)\n", err);
317-
xe_pm_runtime_put(xe);
318-
break;
319-
}
320317

321318
err = xe_bo_notifier_prepare_all_pinned(xe);
322-
if (err) {
319+
if (err)
323320
drm_dbg(&xe->drm, "Notifier prepare pin failed (%d)\n", err);
324-
xe_pm_runtime_put(xe);
325-
}
321+
/*
322+
* Keep the runtime pm reference until post hibernation / post suspend to
323+
* avoid a runtime suspend interfering with evicted objects or backup
324+
* allocations.
325+
*/
326326
break;
327327
case PM_POST_HIBERNATION:
328328
case PM_POST_SUSPEND:
@@ -331,9 +331,6 @@ static int xe_pm_notifier_callback(struct notifier_block *nb,
331331
break;
332332
}
333333

334-
if (err)
335-
return NOTIFY_BAD;
336-
337334
return NOTIFY_DONE;
338335
}
339336

0 commit comments

Comments
 (0)