drm/amd/display: Add and use new dm_prepare_suspend() callback
authorMario Limonciello <mario.limonciello@amd.com>
Thu, 13 Feb 2025 22:26:22 +0000 (16:26 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 10 Mar 2025 17:28:04 +0000 (13:28 -0400)
commit50e0bae34fa6b8b18e13473ddf0bcdab6ab68310
tree0d48b9f3c0cdb6c0308d029782f6f2dde3a35260
parent5e19e2b57b6bb640d68dfc7991e1e182922cf867
drm/amd/display: Add and use new dm_prepare_suspend() callback

[Why]
The displays currently don't get turned off until after other IP blocks
have been suspended.  However turning off the displays first gives a
very visible response that the system is on it's way down.

[How]
Turn off displays in a prepare_suspend() callback instead when possible.
This will help for suspend and hibernate sequences.
The shutdown sequence however will not call prepare() so check whether
the state has been already saved to decide what to do.

Acked-by: Wayne Lin <Wayne.Lin@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c