Skip to contentSkip to conversation

drm/amd/display: Fix memoryleak during S3 resume.

PATCH In review [email protected] 2 participants 2 messages Oct 20, 2017 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: Fix memoryleak during S3 resume.

From: "Leo (Sunpeng) Li" <[email protected]>

Do not create dc_state within display_resume, since it's being constructed within atomic check.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -4
index 4202fd1..b367482 100644
@@ -692,10 +692,6 @@ int amdgpu_dm_display_resume(struct amdgpu_device *adev)
 	 * restoring it.
 	 */
 
-	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_new_crtc_state = to_dm_crtc_state(new_crtc_state);
 		if (dm_new_crtc_state->stream) {
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1508522393-27889-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 6 lines · On 2017-10-20 01:59 PM, [email protected] wrote:

From: "Leo (Sunpeng) Li" <[email protected]>

Do not create dc_state within display_resume, since it's being constructed within atomic check.

Harry

Quoted 10 lines
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
index 4202fd1..b367482 100644

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c int amdgpu_dm_display_resume(struct amdgpu_device *adev) · line 697

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -4
@@ -692,10 +692,6 @@ int amdgpu_dm_display_resume(struct amdgpu_device *adev)
 	 * restoring it.
 	 */
 
-	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_new_crtc_state = to_dm_crtc_state(new_crtc_state);
 		if (dm_new_crtc_state->stream) {

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx