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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Feb 2022 11:03:07 +0000 (12:03 +0100)
commit38108fd273acbc6248870a7a3e61714398af6f94
tree6422a4181c751327aec13c569b4b759cbeb0f5b3
parent72808bb42c87c4887c553ea8d9f4ecaf15d867d3
drm/amd: Only run s3 or s0ix if system is configured properly

[ Upstream commit 04ef860469fda6a646dc841190d05b31fae68e8c ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c