Commit ddc76ff6 authored by Alex Deucher's avatar Alex Deucher

drm/radeon: fixes for gfx clockgating on CIK

Clockgating requires signalling between the CP and the
RLC to work properly.  Resetting the CP block in the
CP resume code messed up the internal coordination
between the blocks.  Removing the reset allows gfx
clockgating to work properly.  However, when gfx clock
gating is enabled, there is a strange interaction with
dpm which causes the chip to stay in the high performance
level all the time, so leave gfx clockgating disabled
for now.
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 473359bc
......@@ -3974,13 +3974,6 @@ static int cik_cp_resume(struct radeon_device *rdev)
{
int r;
/* 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);
r = cik_cp_load_microcode(rdev);
if (r)
return r;
......@@ -5060,9 +5053,9 @@ static void cik_enable_cgcg(struct radeon_device *rdev, bool enable)
orig = data = RREG32(RLC_CGCG_CGLS_CTRL);
cik_enable_gui_idle_interrupt(rdev, enable);
if (enable && (rdev->cg_flags & RADEON_CG_SUPPORT_GFX_CGCG)) {
cik_enable_gui_idle_interrupt(rdev, true);
tmp = cik_halt_rlc(rdev);
cik_select_se_sh(rdev, 0xffffffff, 0xffffffff);
......@@ -5075,6 +5068,8 @@ static void cik_enable_cgcg(struct radeon_device *rdev, bool enable)
data |= CGCG_EN | CGLS_EN;
} else {
cik_enable_gui_idle_interrupt(rdev, false);
RREG32(CB_CGTT_SCLK_CTRL);
RREG32(CB_CGTT_SCLK_CTRL);
RREG32(CB_CGTT_SCLK_CTRL);
......@@ -5383,7 +5378,7 @@ void cik_update_cg(struct radeon_device *rdev,
static void cik_init_cg(struct radeon_device *rdev)
{
cik_update_cg(rdev, RADEON_CG_BLOCK_GFX, false); /* XXX true */
cik_update_cg(rdev, RADEON_CG_BLOCK_GFX, true);
if (rdev->has_uvd)
si_init_uvd_internal_cg(rdev);
......
......@@ -2439,7 +2439,7 @@ int radeon_asic_init(struct radeon_device *rdev)
rdev->num_crtc = 6;
rdev->has_uvd = true;
rdev->cg_flags =
RADEON_CG_SUPPORT_GFX_MGCG |
/*RADEON_CG_SUPPORT_GFX_MGCG |*/
RADEON_CG_SUPPORT_GFX_MGLS |
/*RADEON_CG_SUPPORT_GFX_CGCG |*/
RADEON_CG_SUPPORT_GFX_CGLS |
......@@ -2464,7 +2464,7 @@ int radeon_asic_init(struct radeon_device *rdev)
if (rdev->family == CHIP_KAVERI) {
rdev->num_crtc = 4;
rdev->cg_flags =
RADEON_CG_SUPPORT_GFX_MGCG |
/*RADEON_CG_SUPPORT_GFX_MGCG |*/
RADEON_CG_SUPPORT_GFX_MGLS |
/*RADEON_CG_SUPPORT_GFX_CGCG |*/
RADEON_CG_SUPPORT_GFX_CGLS |
......@@ -2492,7 +2492,7 @@ int radeon_asic_init(struct radeon_device *rdev)
} else {
rdev->num_crtc = 2;
rdev->cg_flags =
RADEON_CG_SUPPORT_GFX_MGCG |
/*RADEON_CG_SUPPORT_GFX_MGCG |*/
RADEON_CG_SUPPORT_GFX_MGLS |
/*RADEON_CG_SUPPORT_GFX_CGCG |*/
RADEON_CG_SUPPORT_GFX_CGLS |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment