[PATCH] drm/xe/pm: hide d3cold sysfs threshold

Matthew Auld matthew.auld at intel.com
Wed Feb 21 17:10:09 UTC 2024


There are known deadlocks and lockdep splats with d3cold and dgpu, which
is why it is disabled by default. However we still don't want CI or
actual users trying to override the DEFAULT_VRAM_THRESHOLD and then end
up enabling d3cold support. For now keep the sysfs hidden if
DEFAULT_VRAM_THRESHOLD is zero.

References: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1246
Signed-off-by: Matthew Auld <matthew.auld at intel.com>
Cc: Anshuman Gupta <anshuman.gupta at intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
---
 drivers/gpu/drm/xe/xe_pm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
index ab283e9a8b4e..829f165e30b4 100644
--- a/drivers/gpu/drm/xe/xe_pm.c
+++ b/drivers/gpu/drm/xe/xe_pm.c
@@ -189,7 +189,8 @@ void xe_pm_init(struct xe_device *xe)
 	xe->d3cold.capable = xe_pm_pci_d3cold_capable(xe);
 
 	if (xe->d3cold.capable) {
-		xe_device_sysfs_init(xe);
+		if (DEFAULT_VRAM_THRESHOLD)
+			xe_device_sysfs_init(xe);
 		xe_pm_set_vram_threshold(xe, DEFAULT_VRAM_THRESHOLD);
 	}
 
-- 
2.43.0



More information about the Intel-xe mailing list