Commit 3d4b0bfc authored by Anshuman Gupta's avatar Anshuman Gupta Committed by Rodrigo Vivi

drm/xe/pm: Add vram_d3cold_threshold for d3cold capable device

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: default avatarAnshuman Gupta <anshuman.gupta@intel.com>
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/all/20230802070449.2426563-1-anshuman.gupta@intel.com/Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent c7e4a611
...@@ -154,8 +154,11 @@ void xe_pm_init(struct xe_device *xe) ...@@ -154,8 +154,11 @@ void xe_pm_init(struct xe_device *xe)
drmm_mutex_init(&xe->drm, &xe->d3cold.lock); drmm_mutex_init(&xe->drm, &xe->d3cold.lock);
xe->d3cold.capable = xe_pm_pci_d3cold_capable(pdev); xe->d3cold.capable = xe_pm_pci_d3cold_capable(pdev);
if (xe->d3cold.capable) {
xe_device_sysfs_init(xe); xe_device_sysfs_init(xe);
xe_pm_set_vram_threshold(xe, DEFAULT_VRAM_THRESHOLD); xe_pm_set_vram_threshold(xe, DEFAULT_VRAM_THRESHOLD);
}
xe_pm_runtime_init(xe); xe_pm_runtime_init(xe);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment