summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Chung <chiahsuan.chung@amd.com>2026-01-20 13:10:31 +0300
committerAlex Deucher <alexander.deucher@amd.com>2026-02-12 23:08:08 +0300
commit64c94cd9be2e188ed07efeafa6a109bce638c967 (patch)
treef6bc5e474b932c0d32b3deadbfa4f8a71bff8099
parent34b11d0a7530ac374f889f4559f5dd85be86670e (diff)
downloadlinux-64c94cd9be2e188ed07efeafa6a109bce638c967.tar.xz
drm/amd/display: Fix system resume lag issue
[Why] System will try to apply idle power optimizations setting during system resume. But system power state is still in D3 state, and it will cause the idle power optimizations command not actually to be sent to DMUB and cause some platforms to go into IPS. [How] Set power state to D0 first before calling the dc_dmub_srv_apply_idle_power_optimizations(dm->dc, false) Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Signed-off-by: Wayne Lin <wayne.lin@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 631b44fd6dae..d870ce267b37 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -3479,7 +3479,17 @@ static int dm_resume(struct amdgpu_ip_block *ip_block)
struct dc_commit_streams_params commit_params = {};
if (dm->dc->caps.ips_support) {
+ if (!amdgpu_in_reset(adev))
+ mutex_lock(&dm->dc_lock);
+
+ /* Need to set POWER_STATE_D0 first or it will not execute
+ * idle_power_optimizations command to DMUB.
+ */
+ dc_dmub_srv_set_power_state(dm->dc->ctx->dmub_srv, DC_ACPI_CM_POWER_STATE_D0);
dc_dmub_srv_apply_idle_power_optimizations(dm->dc, false);
+
+ if (!amdgpu_in_reset(adev))
+ mutex_unlock(&dm->dc_lock);
}
if (amdgpu_in_reset(adev)) {