summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJérôme Glisse <jglisse@redhat.com>2015-06-05 13:33:57 -0400
committerAlex Deucher <alexander.deucher@amd.com>2015-06-11 10:26:42 -0400
commit6dfd197283bffc23a2b046a7f065588de7e1fc1e (patch)
treecc01011088c4f4ecb7bfbe5febfd15d931f74b05 /drivers
parent38d8571dad8a759bdc051dbff747b189c90658cf (diff)
downloadlinux-stable-6dfd197283bffc23a2b046a7f065588de7e1fc1e.tar.gz
linux-stable-6dfd197283bffc23a2b046a7f065588de7e1fc1e.tar.bz2
linux-stable-6dfd197283bffc23a2b046a7f065588de7e1fc1e.zip
drm/radeon: fix freeze for laptop with Turks/Thames GPU.
Laptop with Turks/Thames GPU will freeze if dpm is enabled. It seems the SMC engine is relying on some state inside the CP engine. CP needs to chew at least one packet for it to get in good state for dynamic power management. This patch simply disabled and re-enable DPM after the ring test which is enough to avoid the freeze. Signed-off-by: Jérôme Glisse <jglisse@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/radeon/radeon_device.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index b7ca4c514621..a7fdfa4f0857 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -1463,6 +1463,21 @@ int radeon_device_init(struct radeon_device *rdev,
if (r)
DRM_ERROR("ib ring test failed (%d).\n", r);
+ /*
+ * Turks/Thames GPU will freeze whole laptop if DPM is not restarted
+ * after the CP ring have chew one packet at least. Hence here we stop
+ * and restart DPM after the radeon_ib_ring_tests().
+ */
+ if (rdev->pm.dpm_enabled &&
+ (rdev->pm.pm_method == PM_METHOD_DPM) &&
+ (rdev->family == CHIP_TURKS) &&
+ (rdev->flags & RADEON_IS_MOBILITY)) {
+ mutex_lock(&rdev->pm.mutex);
+ radeon_dpm_disable(rdev);
+ radeon_dpm_enable(rdev);
+ mutex_unlock(&rdev->pm.mutex);
+ }
+
if ((radeon_testing & 1)) {
if (rdev->accel_working)
radeon_test_moves(rdev);