Skip to content

Commit

Permalink
drm/amd/display: fix hibernate entry for DCN35+
Browse files Browse the repository at this point in the history
Since, two suspend-resume cycles are required to enter hibernate and,
since we only need to enable idle optimizations in the first cycle
(which is pretty much equivalent to s2idle). We can check in_s0ix, to
prevent the system from entering idle optimizations before it actually
enters hibernate (from display's perspective). Also, call
dc_set_power_state() before dc_allow_idle_optimizations(), since it's
safer to do so because dc_set_power_state() writes to DMUB.

Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Hamza Mahfooz authored and Alex Deucher committed Oct 7, 2024
1 parent c6a8370 commit 2fe7950
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2996,10 +2996,11 @@ static int dm_suspend(struct amdgpu_ip_block *ip_block)

hpd_rx_irq_work_suspend(dm);

if (adev->dm.dc->caps.ips_support)
dc_allow_idle_optimizations(adev->dm.dc, true);

dc_set_power_state(dm->dc, DC_ACPI_CM_POWER_STATE_D3);

if (dm->dc->caps.ips_support && adev->in_s0ix)
dc_allow_idle_optimizations(dm->dc, true);

dc_dmub_srv_set_power_state(dm->dc->ctx->dmub_srv, DC_ACPI_CM_POWER_STATE_D3);

return 0;
Expand Down

0 comments on commit 2fe7950

Please sign in to comment.