Hello Jerome,

Just to let you know that I'm back and a small intermediate status on this 
story:

On Thursday 18 June 2015 23:16:57 Jerome Glisse wrote:
> Anyway as it is your patch would break runtime suspend.
> 
> I recently posted patch to fix the resume side of hibernation, they might
> also help in the freeze()/thaw() dance. Could you please test them without
> your patch :
> https://patchwork.kernel.org/patch/6641371/
> https://patchwork.kernel.org/patch/6641381/

I tested those two patches, but they (at least separately) didn't give an 
s2disk improvement. 

> If it is not enough than also try with attached patch (which i have not
> tested myself but i think the logic is right).

The reworked patch seemed to worked for the s2disk snapshot-taking 
freeze()->thaw(), but the resume() of the restored image didn't work then.

Attached is a patch onto your 0001-drm-radeon-rework-device-power-management-
for-radeon.patch, which basically realigns the logic to the previous flow of my 
initial patch. With this it works ok again. 

In the freeze() case it does again the "unpin the front buffers" part and in 
thaw() in again does "init dig PHYs, disp eng pll" plus what follows. 

I need to test a bit more which is the minimum delta to have it working with 
regards to your patch. 

The attached patch is just for info. It doesn't reindent the code to keep it 
more readable for the time being. 

So I'll continue "tuning" this is a bit. But I do this just on the high-level 
suspend/resume() sequence that I see in the from the existing code. Without 
deeper radeon-hw-reasoning behind. 

BR, Oliver
>From 7da2941ac275465238f13b33cda5b893e6c6b2a1 Mon Sep 17 00:00:00 2001
From: Oliver Winker <[email protected]>
Date: Sun, 19 Jul 2015 16:31:40 +0200
Subject: [PATCH] 
 0001-drm-radeon-rework-device-power-management-for-radeon.WIP20150719

---
 drivers/gpu/drm/radeon/radeon_device.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index 746215c..6e955ca 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -1556,6 +1556,7 @@ int radeon_suspend_kms(struct drm_device *dev, enum radeon_pm_state state)
 		list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
 			drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
 		}
+	}
 
 		/* unpin the front buffers */
 		list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
@@ -1577,7 +1578,6 @@ int radeon_suspend_kms(struct drm_device *dev, enum radeon_pm_state state)
 		}
 		/* evict vram memory */
 		radeon_bo_evict_vram(rdev);
-	}
 
 	/* wait for gpu to finish processing current batch */
 	for (i = 0; i < RADEON_NUM_RINGS; i++) {
@@ -1664,7 +1664,7 @@ int radeon_resume_kms(struct drm_device *dev, enum radeon_pm_state state)
 		}
 
 		radeon_restore_bios_scratch_regs(rdev);
-
+	}
 		/* init dig PHYs, disp eng pll */
 		if (rdev->is_atom_bios) {
 			radeon_atom_encoder_init(rdev);
@@ -1696,7 +1696,6 @@ int radeon_resume_kms(struct drm_device *dev, enum radeon_pm_state state)
 		 * as during thaw() we do not care for screen hotplug really.
 		 */
 		drm_kms_helper_poll_enable(dev);
-	}
 
 	/* set the power state here in case we are a PX system or headless */
 	if ((rdev->pm.pm_method == PM_METHOD_DPM) && rdev->pm.dpm_enabled)
-- 
2.1.4

_______________________________________________
xorg-driver-ati mailing list
[email protected]
http://lists.x.org/mailman/listinfo/xorg-driver-ati

Reply via email to