From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Anshuman Gupta <anshuman.gupta@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [Intel-xe] [PATCH] drm/xe/pm: WARN_ON() on unbounded pcie parent bridge device
Date: Mon, 8 May 2023 13:14:35 -0400 [thread overview]
Message-ID: <ZFkt+7SAlhL/T5gt@intel.com> (raw)
In-Reply-To: <20230508091734.1938204-1-anshuman.gupta@intel.com>
On Mon, May 08, 2023 at 02:47:34PM +0530, Anshuman Gupta 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 drm_WARN_ON() on unbounded VSP.
>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> ---
> drivers/gpu/drm/xe/xe_pci.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
> index 19ead642442e..dc0d5cb4950b 100644
> --- a/drivers/gpu/drm/xe/xe_pci.c
> +++ b/drivers/gpu/drm/xe/xe_pci.c
> @@ -667,12 +667,24 @@ static void xe_pci_shutdown(struct pci_dev *pdev)
> xe_device_shutdown(pdev_to_xe_device(pdev));
> }
>
> +static void xe_assert_on_unbounded_bridge(struct pci_dev *pdev)
> +{
> + struct pci_dev *bridge = pci_upstream_bridge(pdev);
> + struct xe_device *xe = pdev_to_xe_device(pdev);
> +
> + if (!bridge)
> + return;
> +
> + drm_WARN_ON(&xe->drm, !bridge->driver);
> +}
> +
> #ifdef CONFIG_PM_SLEEP
> static int xe_pci_suspend(struct device *dev)
> {
> struct pci_dev *pdev = to_pci_dev(dev);
> int err;
>
> + xe_assert_on_unbounded_bridge(pdev);
besides warning, shouldn't we block the suspend at all?
returning from this point...
> err = xe_pm_suspend(pdev_to_xe_device(pdev));
> if (err)
> return err;
> @@ -718,6 +730,7 @@ static int xe_pci_runtime_suspend(struct device *dev)
> struct xe_device *xe = pdev_to_xe_device(pdev);
> int err;
>
> + xe_assert_on_unbounded_bridge(pdev);
> err = xe_pm_runtime_suspend(xe);
> if (err)
> return err;
> --
> 2.38.0
>
next prev parent reply other threads:[~2023-05-08 17:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-08 9:17 [Intel-xe] [PATCH] drm/xe/pm: WARN_ON() on unbounded pcie parent bridge device Anshuman Gupta
2023-05-08 9:22 ` [Intel-xe] ✓ CI.Patch_applied: success for " Patchwork
2023-05-08 9:23 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-05-08 9:27 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-05-08 9:52 ` [Intel-xe] ○ CI.BAT: info " Patchwork
2023-05-08 17:14 ` Rodrigo Vivi [this message]
2023-05-09 3:20 ` [Intel-xe] [PATCH] " Gupta, Anshuman
2023-05-09 17:26 ` Rodrigo Vivi
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=ZFkt+7SAlhL/T5gt@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=intel-xe@lists.freedesktop.org \
/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