aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo (Sunpeng) Li <sunpeng.li@amd.com>2017-10-20 13:59:53 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-10-21 16:53:53 -0400
commitaf09e48aa52377eb807709e2a1cdc33e9fd1ac94 (patch)
tree702ef010acc02571f84517d4279fb62e608a5c14
parentfc9e9920b1d3a7a6af7eb993d531c36beb985570 (diff)
drm/amd/display: Fix memoryleak during S3 resume.
Do not create dc_state within display_resume, since it's being constructed within atomic check. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c4
1 files changed, 0 insertions, 4 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 51258d045167..d0ee1b3b8b5c 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -694,10 +694,6 @@ int amdgpu_dm_display_resume(struct amdgpu_device *adev)
694 WARN_ON(kref_read(&cached_state->context->refcount) > 1); 694 WARN_ON(kref_read(&cached_state->context->refcount) > 1);
695 dc_release_state(cached_state->context); 695 dc_release_state(cached_state->context);
696 696
697 cached_state->context = dc_create_state();
698 ASSERT(cached_state->context);
699 dc_resource_state_copy_construct_current(adev->dm.dc, cached_state->context);
700
701 for_each_new_crtc_in_state(adev->dm.cached_state, crtc, new_crtc_state, i) { 697 for_each_new_crtc_in_state(adev->dm.cached_state, crtc, new_crtc_state, i) {
702 dm_crtc_state = to_dm_crtc_state(new_crtc_state); 698 dm_crtc_state = to_dm_crtc_state(new_crtc_state);
703 if (dm_crtc_state->stream) { 699 if (dm_crtc_state->stream) {