Skip to content

Commit

Permalink
drm/amd/display: Fix memoryleak during S3 resume.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Leo (Sunpeng) Li authored and Alex Deucher committed Oct 21, 2017
1 parent fc9e992 commit af09e48
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,10 +694,6 @@ int amdgpu_dm_display_resume(struct amdgpu_device *adev)
WARN_ON(kref_read(&cached_state->context->refcount) > 1);
dc_release_state(cached_state->context);

cached_state->context = dc_create_state();
ASSERT(cached_state->context);
dc_resource_state_copy_construct_current(adev->dm.dc, cached_state->context);

for_each_new_crtc_in_state(adev->dm.cached_state, crtc, new_crtc_state, i) {
dm_crtc_state = to_dm_crtc_state(new_crtc_state);
if (dm_crtc_state->stream) {
Expand Down

0 comments on commit af09e48

Please sign in to comment.