Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/radeon: SDMA fix hibernation (CI GPU family).

In order for hibernation to reliably work we need to properly turn
off the SDMA block, sadly after numerous attemps i haven't not found
proper sequence for clean and full shutdown. So simply reset both
SDMA block, this makes hibernation works reliably on sea island GPU
family (CI)

Hibernation and suspend to ram were tested (several times) on :
Bonaire
Hawaii
Mullins
Kaveri
Kabini

Cc: stable@vger.kernel.org
Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Jérôme Glisse and committed by
Alex Deucher
2ba8d1bb 161569de

+11
+11
drivers/gpu/drm/radeon/cik_sdma.c
··· 268 268 } 269 269 rdev->ring[R600_RING_TYPE_DMA_INDEX].ready = false; 270 270 rdev->ring[CAYMAN_RING_TYPE_DMA1_INDEX].ready = false; 271 + 272 + /* FIXME use something else than big hammer but after few days can not 273 + * seem to find good combination so reset SDMA blocks as it seems we 274 + * do not shut them down properly. This fix hibernation and does not 275 + * affect suspend to ram. 276 + */ 277 + WREG32(SRBM_SOFT_RESET, SOFT_RESET_SDMA | SOFT_RESET_SDMA1); 278 + (void)RREG32(SRBM_SOFT_RESET); 279 + udelay(50); 280 + WREG32(SRBM_SOFT_RESET, 0); 281 + (void)RREG32(SRBM_SOFT_RESET); 271 282 } 272 283 273 284 /**