diff options
author | Hawking Zhang <Hawking.Zhang@amd.com> | 2017-05-26 14:40:36 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-05-31 14:16:35 -0400 |
commit | e8835e0e43ecf0eba2e2810bee04ff39dabb8996 (patch) | |
tree | 5d28298d55bd5e54fd0d52e7058cf2549a5d8770 /drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | |
parent | ba7bb6658e638d2235ce5abf8a24a08c7a1eff60 (diff) | |
download | talos-op-linux-e8835e0e43ecf0eba2e2810bee04ff39dabb8996.tar.gz talos-op-linux-e8835e0e43ecf0eba2e2810bee04ff39dabb8996.zip |
drm/amdgpu: enable lbpw on raven
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c index b5aa537254d0..ec891b3f4a82 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c @@ -683,6 +683,18 @@ static void gfx_v9_0_init_lbpw(struct amdgpu_device *adev) mutex_unlock(&adev->grbm_idx_mutex); } +static void gfx_v9_0_enable_lbpw(struct amdgpu_device *adev, bool enable) +{ + uint32_t data = 0; + + data = RREG32_SOC15(GC, 0, mmRLC_LB_CNTL); + if (enable) + data |= RLC_LB_CNTL__LOAD_BALANCE_ENABLE_MASK; + else + data &= ~RLC_LB_CNTL__LOAD_BALANCE_ENABLE_MASK; + WREG32_SOC15(GC, 0, mmRLC_LB_CNTL, data); +} + static void rv_init_cp_jump_table(struct amdgpu_device *adev) { const __le32 *fw_data; @@ -2229,6 +2241,13 @@ static int gfx_v9_0_rlc_resume(struct amdgpu_device *adev) return r; } + if (adev->asic_type == CHIP_RAVEN) { + if (amdgpu_lbpw != 0) + gfx_v9_0_enable_lbpw(adev, true); + else + gfx_v9_0_enable_lbpw(adev, false); + } + gfx_v9_0_rlc_start(adev); return 0; |