drm/amd: Only run s3 or s0ix if system is configured properly
authorMario Limonciello <mario.limonciello@amd.com>
Wed, 26 Jan 2022 03:37:57 +0000 (21:37 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 2 Feb 2022 23:35:00 +0000 (18:35 -0500)
commit04ef860469fda6a646dc841190d05b31fae68e8c
tree6a5373245230092118f43ded4aff3e7fd704dfb6
parentf52a2b8badbd24faf73a13c9c07fdb9d07352944
drm/amd: Only run s3 or s0ix if system is configured properly

This will cause misconfigured systems to not run the GPU suspend
routines.

* In APUs that are properly configured system will go into s2idle.
* In APUs that are intended to be S3 but user selects
  s2idle the GPU will stay fully powered for the suspend.
* In APUs that are intended to be s2idle and system misconfigured
  the GPU will stay fully powered for the suspend.
* In systems that are intended to be s2idle, but AMD dGPU is also
  present, the dGPU will go through S3

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c