From: Anshuman Gupta <anshuman.gupta@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: jani.nikula@intel.com, Anshuman Gupta <anshuman.gupta@intel.com>,
rodrigo.vivi@intel.com
Subject: [Intel-xe] [PATCH v3] drm/xe/pm: Disable PM on unbounded pcie parent bridge
Date: Thu, 18 May 2023 14:22:59 +0530 [thread overview]
Message-ID: <20230518085259.4083944-1-anshuman.gupta@intel.com> (raw)
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]
v3:
- Changed subject and Rebase.
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
---
drivers/gpu/drm/xe/xe_pci.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index e789a50a1310..e09d76b7755a 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -603,6 +603,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;
@@ -628,10 +641,13 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
return -ENODEV;
}
+
err = xe_display_driver_probe_defer(pdev);
if (err)
return err;
+ xe_pci_unbounded_bridge_disable_pm(pdev);
+
xe = xe_device_create(pdev, ent);
if (IS_ERR(xe))
return PTR_ERR(xe);
--
2.38.0
next reply other threads:[~2023-05-18 8:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-18 8:52 Anshuman Gupta [this message]
2023-05-18 8:58 ` [Intel-xe] ✓ CI.Patch_applied: success for drm/xe/pm: Disable PM on unbounded pcie parent bridge Patchwork
2023-05-18 8:59 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-05-18 9:03 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-05-18 9:34 ` [Intel-xe] ○ CI.BAT: info " Patchwork
2023-05-18 17:11 ` [Intel-xe] [PATCH v3] " Rodrigo Vivi
2023-05-19 4:58 ` Gupta, Anshuman
2023-05-22 16:28 ` Gupta, Anshuman
2023-05-22 18:03 ` Rodrigo Vivi
2023-05-22 18:34 ` Sudeep Holla
2023-05-22 8:52 ` Jani Nikula
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230518085259.4083944-1-anshuman.gupta@intel.com \
--to=anshuman.gupta@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=rodrigo.vivi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.