diff options
author | Jérôme Glisse <jglisse@redhat.com> | 2015-06-05 13:33:57 -0400 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2015-06-23 14:55:13 +0200 |
commit | 8ff2f15484e7e280d14098aabcb37f02c512c1bc (patch) | |
tree | cc3665b1bc29edefba39ee51988cf32dba9ee54c /drivers/gpu | |
parent | a161c7118ad2f43104f34866c932693dff966d2f (diff) | |
download | lwn-8ff2f15484e7e280d14098aabcb37f02c512c1bc.tar.gz lwn-8ff2f15484e7e280d14098aabcb37f02c512c1bc.zip |
drm/radeon: fix freeze for laptop with Turks/Thames GPU.
commit 6dfd197283bffc23a2b046a7f065588de7e1fc1e upstream.
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>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_device.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index 841d0e09be3e..8ca31266aa4a 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c @@ -1319,6 +1319,22 @@ int radeon_device_init(struct radeon_device *rdev, if (r) return 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); |