[Intel-xe] [PATCH v2] drm/xe/pm: WARN_ON() on unbounded pcie parent bridge device

Jani Nikula jani.nikula at linux.intel.com
Wed May 17 12:57:34 UTC 2023


On Thu, 11 May 2023, Anshuman Gupta <anshuman.gupta at 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]
>
> Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
> Signed-off-by: Anshuman Gupta <anshuman.gupta at 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");

The patch subject does not match the code.

BR,
Jani.

> +		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);

-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the Intel-xe mailing list