From de544833dd63b0a55952b73f8306848732507cb0 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Tue, 10 Jun 2014 16:43:01 -0400 Subject: [PATCH] drm/radeon/cik: soft reset the CP when initializing the asic May help stability. bug: https://bugs.freedesktop.org/show_bug.cgi?id=79862 Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org --- drivers/gpu/drm/radeon/cik.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c index dcd4518..2ef8a2c 100644 --- a/drivers/gpu/drm/radeon/cik.c +++ b/drivers/gpu/drm/radeon/cik.c @@ -7881,6 +7881,16 @@ restart_ih: return IRQ_HANDLED; } +static void cik_reset_cp(struct radeon_device *rdev) +{ + /* Reset all cp blocks */ + WREG32(GRBM_SOFT_RESET, SOFT_RESET_CP); + RREG32(GRBM_SOFT_RESET); + mdelay(15); + WREG32(GRBM_SOFT_RESET, 0); + RREG32(GRBM_SOFT_RESET); +} + /* * startup/shutdown callbacks */ @@ -8141,6 +8151,9 @@ int cik_resume(struct radeon_device *rdev) /* post card */ atom_asic_init(rdev->mode_info.atom_context); + /* reset the CP */ + cik_reset_cp(rdev); + /* init golden registers */ cik_init_golden_registers(rdev); @@ -8230,6 +8243,8 @@ int cik_init(struct radeon_device *rdev) DRM_INFO("GPU not posted. posting now...\n"); atom_asic_init(rdev->mode_info.atom_context); } + /* reset the CP */ + cik_reset_cp(rdev); /* init golden registers */ cik_init_golden_registers(rdev); /* Initialize scratch registers */ -- 1.8.3.1