From: Jani Nikula <jani.nikula@intel.com>
To: Anshuman Gupta <anshuman.gupta@intel.com>,
intel-xe@lists.freedesktop.org
Cc: Anshuman Gupta <anshuman.gupta@intel.com>, rodrigo.vivi@intel.com
Subject: Re: [Intel-xe] [PATCH v3] drm/xe/pm: Disable PM on unbounded pcie parent bridge
Date: Mon, 22 May 2023 11:52:58 +0300 [thread overview]
Message-ID: <87fs7ooihh.fsf@intel.com> (raw)
In-Reply-To: <20230518085259.4083944-1-anshuman.gupta@intel.com>
On Thu, 18 May 2023, Anshuman Gupta <anshuman.gupta@intel.com> wrote:
> 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;
> }
>
> +
Please make a habit out of running checkpatch.pl --strict locally to
save everyone's time.
CHECK: Please don't use multiple blank lines
#91: FILE: drivers/gpu/drm/xe/xe_pci.c:644:
+
> 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);
--
Jani Nikula, Intel Open Source Graphics Center
prev parent reply other threads:[~2023-05-22 8:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-18 8:52 [Intel-xe] [PATCH v3] drm/xe/pm: Disable PM on unbounded pcie parent bridge Anshuman Gupta
2023-05-18 8:58 ` [Intel-xe] ✓ CI.Patch_applied: success for " 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 [this message]
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=87fs7ooihh.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox