Skip to content

Commit f2eedad

Browse files
committed
drm/xe/pm: Also avoid missing outer rpm warning on system suspend
Fix the false-positive "Missing outer runtime PM protection" warning triggered by release_async_domains() -> intel_runtime_pm_get_noresume() -> xe_pm_runtime_get_noresume() during system suspend. xe_pm_runtime_get_noresume() is supposed to warn if the device is not in the runtime resumed state, using xe_pm_runtime_get_if_in_use() for this. However the latter function will fail if called during runtime or system suspend/resume, regardless of whether the device is runtime resumed or not. Based on the above suppress the warning during system suspend/resume, similarly to how this is done during runtime suspend/resume. Suggested-by: Imre Deak <[email protected]> Reviewed-by: Imre Deak <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent a8d0aa0 commit f2eedad

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/gpu/drm/xe/xe_pm.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#include <linux/fault-inject.h>
99
#include <linux/pm_runtime.h>
10+
#include <linux/suspend.h>
1011

1112
#include <drm/drm_managed.h>
1213
#include <drm/ttm/ttm_placement.h>
@@ -607,7 +608,8 @@ static bool xe_pm_suspending_or_resuming(struct xe_device *xe)
607608
struct device *dev = xe->drm.dev;
608609

609610
return dev->power.runtime_status == RPM_SUSPENDING ||
610-
dev->power.runtime_status == RPM_RESUMING;
611+
dev->power.runtime_status == RPM_RESUMING ||
612+
pm_suspend_target_state != PM_SUSPEND_ON;
611613
#else
612614
return false;
613615
#endif

0 commit comments

Comments
 (0)