diff options
author | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-07-25 18:11:56 -0400 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-21 11:39:15 -0500 |
commit | e07aa913161b0338708887a5e78bf57ffdfe67fa (patch) | |
tree | 1ddd00bee7c01e6c2cb869dbea0174288e083fe5 /drivers/gpu/drm/xe/xe_pci.c | |
parent | f026520367be5f7e05531d6e601c822596ebe65f (diff) |
drm/xe: Move d3cold_allowed decision all together.
And let's use the VRAM threshold to keep d3cold temporarily disabled.
With this we have the ability to run D3Cold experiments just by
touching the vram_d3cold_threshold sysfs entry.
Cc: Anshuman Gupta <anshuman.gupta@intel.com>
Reviewed-by: Anshuman Gupta <anshuman.gupta@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_pci.c')
-rw-r--r-- | drivers/gpu/drm/xe/xe_pci.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c index 1a79c6a7dd5e..4cbacc80594b 100644 --- a/drivers/gpu/drm/xe/xe_pci.c +++ b/drivers/gpu/drm/xe/xe_pci.c @@ -806,20 +806,7 @@ static int xe_pci_runtime_idle(struct device *dev) struct pci_dev *pdev = to_pci_dev(dev); struct xe_device *xe = pdev_to_xe_device(pdev); - if (!xe->d3cold.capable) { - xe->d3cold.allowed = false; - } else { - xe_pm_d3cold_allowed_toggle(xe); - - /* - * TODO: d3cold should be allowed (true) if - * (IS_DGFX(xe) && !xe_device_mem_access_ongoing(xe)) - * but maybe include some other conditions. So, before - * we can re-enable the D3cold, we need to: - * 1. rewrite the VRAM save / restore to avoid buffer object locks - */ - xe->d3cold.allowed = false; - } + xe_pm_d3cold_allowed_toggle(xe); return 0; } |