summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c4
1 files changed, 4 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 e16e87173db3..a41d271f21a3 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -508,6 +508,7 @@ static int dm_suspend(void *handle)
amdgpu_dm_irq_suspend(adev);
+ WARN_ON(adev->dm.cached_state);
adev->dm.cached_state = drm_atomic_helper_suspend(adev->ddev);
dc_set_power_state(
@@ -607,6 +608,9 @@ int amdgpu_dm_display_resume(struct amdgpu_device *adev )
ret = drm_atomic_helper_resume(ddev, adev->dm.cached_state);
+ drm_atomic_state_put(adev->dm.cached_state);
+ adev->dm.cached_state = NULL;
+
amdgpu_dm_irq_resume_late(adev);
return ret;