drm/amd: Enable PCIe PME from D3
authorMario Limonciello <mario.limonciello@amd.com>
Fri, 24 Nov 2023 15:56:32 +0000 (09:56 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 29 Nov 2023 23:09:34 +0000 (18:09 -0500)
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@vger.kernel.org # 6.1+
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

index 8f24cabe21554688126ad061dc7d6f288c1e4fad..8b33b130ea36e99fa2a8e838868edd551a07908c 100644 (file)
@@ -2263,6 +2263,8 @@ retry_init:
                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: