Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH 1/4] drm/xe: Only set PCI d3cold_allowed when we are really allowing.
@ 2023-07-20 21:03 Rodrigo Vivi
  2023-07-20 21:03 ` [Intel-gfx] [PATCH 2/4] drm/xe: Move d3cold_allowed decision all together Rodrigo Vivi
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Rodrigo Vivi @ 2023-07-20 21:03 UTC (permalink / raw)
  To: intel-gfx; +Cc: Rodrigo Vivi

First of all it was strange to see:
if (allowed) {
...
} else {
   D3COLD_ENABLE
}

But besides this misalignment, let's also use the pci
d3cold_allowed useful to us and know that we are not really
allowing d3cold.

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

diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index 78df43c20cd2..0c4051f4f746 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -794,6 +794,7 @@ static int xe_pci_runtime_suspend(struct device *dev)
 	pci_save_state(pdev);
 
 	if (xe->d3cold.allowed) {
+		d3cold_toggle(pdev, D3COLD_ENABLE);
 		pci_disable_device(pdev);
 		pci_ignore_hotplug(pdev);
 		pci_set_power_state(pdev, PCI_D3cold);
@@ -823,8 +824,6 @@ static int xe_pci_runtime_resume(struct device *dev)
 			return err;
 
 		pci_set_master(pdev);
-	} else {
-		d3cold_toggle(pdev, D3COLD_ENABLE);
 	}
 
 	return xe_pm_runtime_resume(xe);
-- 
2.41.0


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

end of thread, other threads:[~2023-07-25 21:18 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-20 21:03 [Intel-gfx] [PATCH 1/4] drm/xe: Only set PCI d3cold_allowed when we are really allowing Rodrigo Vivi
2023-07-20 21:03 ` [Intel-gfx] [PATCH 2/4] drm/xe: Move d3cold_allowed decision all together Rodrigo Vivi
2023-07-21  7:42   ` Gupta, Anshuman
2023-07-20 21:03 ` [Intel-gfx] [PATCH 3/4] drm/xe: Fix the runtime_idle call and d3cold.allowed decision Rodrigo Vivi
2023-07-21  6:00   ` Gupta, Anshuman
2023-07-21 19:07     ` Rodrigo Vivi
2023-07-20 21:03 ` [Intel-gfx] [PATCH 4/4] drm/xe: Only init runtime PM after all d3cold config is in place Rodrigo Vivi
2023-07-21  7:27   ` Gupta, Anshuman
2023-07-20 21:13 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for series starting with [1/4] drm/xe: Only set PCI d3cold_allowed when we are really allowing Patchwork
2023-07-21  7:39 ` [Intel-gfx] [PATCH 1/4] " Gupta, Anshuman
2023-07-21 19:00   ` Rodrigo Vivi
2023-07-25  5:08     ` Gupta, Anshuman
2023-07-25 21:18       ` Rodrigo Vivi

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