diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2016-07-18 12:19:08 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-07-29 14:37:00 -0400 |
commit | ec38f1889a8bf949f53ef9eaf52842f087596edf (patch) | |
tree | 54cfc50415f27ecf5426f48b9f932e74aeb54650 /drivers/gpu/drm/amd | |
parent | a93d54d842ac5d1502fce65d8d937a41a45245af (diff) |
drm/amdgpu: add bypass mode for vce3.0
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Eric Huang <JinhuiEric.Huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c index 559209bb0083..800c10bcb6cd 100644 --- a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +++ b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | |||
@@ -655,6 +655,18 @@ static int vce_v3_0_process_interrupt(struct amdgpu_device *adev, | |||
655 | return 0; | 655 | return 0; |
656 | } | 656 | } |
657 | 657 | ||
658 | static void vce_v3_set_bypass_mode(struct amdgpu_device *adev, bool enable) | ||
659 | { | ||
660 | u32 tmp = RREG32_SMC(ixGCK_DFS_BYPASS_CNTL); | ||
661 | |||
662 | if (enable) | ||
663 | tmp |= GCK_DFS_BYPASS_CNTL__BYPASSECLK_MASK; | ||
664 | else | ||
665 | tmp &= ~GCK_DFS_BYPASS_CNTL__BYPASSECLK_MASK; | ||
666 | |||
667 | WREG32_SMC(ixGCK_DFS_BYPASS_CNTL, tmp); | ||
668 | } | ||
669 | |||
658 | static int vce_v3_0_set_clockgating_state(void *handle, | 670 | static int vce_v3_0_set_clockgating_state(void *handle, |
659 | enum amd_clockgating_state state) | 671 | enum amd_clockgating_state state) |
660 | { | 672 | { |
@@ -662,6 +674,9 @@ static int vce_v3_0_set_clockgating_state(void *handle, | |||
662 | bool enable = (state == AMD_CG_STATE_GATE) ? true : false; | 674 | bool enable = (state == AMD_CG_STATE_GATE) ? true : false; |
663 | int i; | 675 | int i; |
664 | 676 | ||
677 | if (adev->asic_type == CHIP_POLARIS10) | ||
678 | vce_v3_set_bypass_mode(adev, enable); | ||
679 | |||
665 | if (!(adev->cg_flags & AMD_CG_SUPPORT_VCE_MGCG)) | 680 | if (!(adev->cg_flags & AMD_CG_SUPPORT_VCE_MGCG)) |
666 | return 0; | 681 | return 0; |
667 | 682 | ||