diff --git a/drivers/gpu/drm/xe/compat-i915-headers/intel_runtime_pm.h b/drivers/gpu/drm/xe/compat-i915-headers/intel_runtime_pm.h index f7f3286e2c5343..89da3cc62f39aa 100644 --- a/drivers/gpu/drm/xe/compat-i915-headers/intel_runtime_pm.h +++ b/drivers/gpu/drm/xe/compat-i915-headers/intel_runtime_pm.h @@ -5,12 +5,6 @@ #include "intel_wakeref.h" -enum i915_drm_suspend_mode { - I915_DRM_SUSPEND_IDLE, - I915_DRM_SUSPEND_MEM, - I915_DRM_SUSPEND_HIBERNATE, -}; - #define intel_runtime_pm xe_runtime_pm static inline void disable_rpm_wakeref_asserts(void *rpm) diff --git a/drivers/gpu/drm/xe/xe_display.c b/drivers/gpu/drm/xe/xe_display.c index edfc7fce1ed314..fa20faf3cc83ba 100644 --- a/drivers/gpu/drm/xe/xe_display.c +++ b/drivers/gpu/drm/xe/xe_display.c @@ -321,6 +321,7 @@ static void intel_suspend_encoders(struct xe_device *xe) void xe_display_pm_suspend(struct xe_device *xe) { + bool s2idle = acpi_target_system_state() < ACPI_STATE_S3; if (!xe->info.enable_display) return; @@ -340,7 +341,7 @@ void xe_display_pm_suspend(struct xe_device *xe) intel_suspend_encoders(xe); - intel_opregion_suspend(xe, PCI_D3cold); + intel_opregion_suspend(xe, s2idle ? PCI_D1 : PCI_D3cold); intel_fbdev_set_suspend(&xe->drm, FBINFO_STATE_SUSPENDED, true); @@ -349,10 +350,11 @@ void xe_display_pm_suspend(struct xe_device *xe) void xe_display_pm_suspend_late(struct xe_device *xe) { + bool s2idle = acpi_target_system_state() < ACPI_STATE_S3; if (!xe->info.enable_display) return; - intel_power_domains_suspend(xe, I915_DRM_SUSPEND_MEM); + intel_power_domains_suspend(xe, s2idle); intel_display_power_suspend_late(xe); } diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c index 05c6b6df8210bc..097b685981912e 100644 --- a/drivers/gpu/drm/xe/xe_pci.c +++ b/drivers/gpu/drm/xe/xe_pci.c @@ -795,10 +795,6 @@ static int xe_pci_suspend(struct device *dev) pci_save_state(pdev); pci_disable_device(pdev); - err = pci_set_power_state(pdev, PCI_D3hot); - if (err) - return err; - return 0; } @@ -814,8 +810,6 @@ static int xe_pci_resume(struct device *dev) if (err) return err; - pci_restore_state(pdev); - err = pci_enable_device(pdev); if (err) return err;