Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-xe] [PATCH] drm/xe/pm: Add vram_d3cold_threshold for d3cold capable device
@ 2023-08-02  7:04 Anshuman Gupta
  2023-08-02  7:08 ` [Intel-xe] ✓ CI.Patch_applied: success for " Patchwork
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Anshuman Gupta @ 2023-08-02  7:04 UTC (permalink / raw)
  To: intel-xe; +Cc: rodrigo.vivi

Do not register vram_d3cold_threshold device sysfs universally
for each gfx device, only register sysfs and set the threshold
value for d3cold capable devices.

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
---
 drivers/gpu/drm/xe/xe_pm.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
index 8bb8e154e5f8..0f06d8304e17 100644
--- a/drivers/gpu/drm/xe/xe_pm.c
+++ b/drivers/gpu/drm/xe/xe_pm.c
@@ -165,8 +165,11 @@ void xe_pm_init(struct xe_device *xe)
 	drmm_mutex_init(&xe->drm, &xe->d3cold.lock);
 
 	xe->d3cold.capable = xe_pm_pci_d3cold_capable(pdev);
-	xe_device_sysfs_init(xe);
-	xe_pm_set_vram_threshold(xe, DEFAULT_VRAM_THRESHOLD);
+
+	if (xe->d3cold.capable) {
+		xe_device_sysfs_init(xe);
+		xe_pm_set_vram_threshold(xe, DEFAULT_VRAM_THRESHOLD);
+	}
 
 	xe_pm_runtime_init(xe);
 }
-- 
2.38.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-08-04  7:41 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-02  7:04 [Intel-xe] [PATCH] drm/xe/pm: Add vram_d3cold_threshold for d3cold capable device Anshuman Gupta
2023-08-02  7:08 ` [Intel-xe] ✓ CI.Patch_applied: success for " Patchwork
2023-08-02  7:08 ` [Intel-xe] ✓ CI.checkpatch: " Patchwork
2023-08-02  7:09 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-08-02  7:13 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-08-02  7:14 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-08-02  7:15 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-08-02  7:48 ` [Intel-xe] ○ CI.BAT: info " Patchwork
2023-08-02 13:16 ` [Intel-xe] [PATCH] " Rodrigo Vivi
2023-08-04  7:40 ` [Intel-xe] ○ CI.BAT: info for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox