[PATCH] drm/amd: Enable PCIe PME from D3

Alex Deucher alexdeucher at gmail.com
Mon Nov 27 20:25:42 UTC 2023


On Mon, Nov 27, 2023 at 2:17 PM Mario Limonciello
<mario.limonciello at amd.com> wrote:
>
> When dGPU is put into BOCO it may be in D3cold but still able send
> PME on display hotplug event. For this to work it must be enabled
> as wake source from D3.
>
> When runpm is enabled use pci_wake_from_d3() to mark wakeup as
> enabled by default.
>
> Cc: stable at vger.kernel.org # 6.1+
> Signed-off-by: Mario Limonciello <mario.limonciello at amd.com>

Acked-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index 5d009175318e..08763f6de482 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -2263,6 +2263,8 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
>                 pm_runtime_mark_last_busy(ddev->dev);
>                 pm_runtime_put_autosuspend(ddev->dev);
>
> +               pci_wake_from_d3(pdev, TRUE);
> +
>                 /*
>                  * For runpm implemented via BACO, PMFW will handle the
>                  * timing for BACO in and out:
> --
> 2.34.1
>


More information about the amd-gfx mailing list