]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: add a dev_pm_ops prepare callback (v2)
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Mar 2021 05:41:49 +0000 (00:41 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Apr 2021 20:35:55 +0000 (16:35 -0400)
commit8c8cbf6a8e1575445a55d2003956a22f82b86368
treeb613c822cef797d35f4a8a0bc65b656db28b5fc7
parent5e4645de6fc4c143afa8c8323c50aa0763449a02
drm/amdgpu: add a dev_pm_ops prepare callback (v2)

as per:
https://www.kernel.org/doc/html/latest/driver-api/pm/devices.html

The prepare callback is required to support the DPM_FLAG_SMART_SUSPEND
driver flag.  This allows runtime pm to auto complete when the
system goes into suspend avoiding a wake up on suspend and on resume.
Apply this for hybrid gfx and BOCO systems where d3cold is
provided by the ACPI platform.

v2: check if device is runtime suspended in prepare.

Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c