Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-xe] [PATCH v2] drm/xe/pm: WARN_ON() on unbounded pcie parent bridge device
@ 2023-05-11  9:48 Anshuman Gupta
  2023-05-11 10:06 ` [Intel-xe] ✓ CI.Patch_applied: success for drm/xe/pm: WARN_ON() on unbounded pcie parent bridge device (rev2) Patchwork
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Anshuman Gupta @ 2023-05-11  9:48 UTC (permalink / raw)
  To: intel-xe; +Cc: Anshuman Gupta, rodrigo.vivi

Intel Discrete GFX cards gfx may have multiple PCIe endpoints,
they connects to root port via pcie upstream switch port(USP)
and virtual pcie switch port(VSP), sometimes VSP pcie devices
doesn't bind to pcieport driver. Without pcieport driver pcie PM
comes without any warranty and with unbounded VSP gfx card won't
transition to low power pcie device and link state therefore
assert dev_warn on unbounded VSP and disable xe driver
PM support.

v2:
- Disable Xe PCI PM support. [Rodrigo]

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

diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index 855cf8557056..ee61a03d1afd 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -579,6 +579,19 @@ static void xe_pci_remove(struct pci_dev *pdev)
 	pci_set_drvdata(pdev, NULL);
 }
 
+static void xe_pci_unbounded_bridge_disable_pm(struct pci_dev *pdev)
+{
+	struct pci_dev *bridge = pci_upstream_bridge(pdev);
+
+	if (!bridge)
+		return;
+
+	if (!bridge->driver) {
+		dev_warn(&pdev->dev, "unbounded parent pci bridge, device won't support any PM support.\n");
+		pdev->driver->driver.pm = NULL;
+	}
+}
+
 static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
 	const struct xe_device_desc *desc = (const void *)ent->driver_data;
@@ -604,6 +617,7 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		return -ENODEV;
 	}
 
+	xe_pci_unbounded_bridge_disable_pm(pdev);
 	xe = xe_device_create(pdev, ent);
 	if (IS_ERR(xe))
 		return PTR_ERR(xe);
-- 
2.38.0


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

end of thread, other threads:[~2023-05-17 12:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-11  9:48 [Intel-xe] [PATCH v2] drm/xe/pm: WARN_ON() on unbounded pcie parent bridge device Anshuman Gupta
2023-05-11 10:06 ` [Intel-xe] ✓ CI.Patch_applied: success for drm/xe/pm: WARN_ON() on unbounded pcie parent bridge device (rev2) Patchwork
2023-05-11 10:08 ` [Intel-xe] ✗ CI.KUnit: failure " Patchwork
2023-05-12  9:18 ` [Intel-xe] ✓ CI.Patch_applied: success " Patchwork
2023-05-12  9:20 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-05-12  9:24 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-05-12  9:40 ` [Intel-xe] ○ CI.BAT: info " Patchwork
2023-05-17 12:20 ` [Intel-xe] [PATCH v2] drm/xe/pm: WARN_ON() on unbounded pcie parent bridge device Nilawar, Badal
2023-05-17 12:57 ` Jani Nikula

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