drm/amdgpu: enable VCE clockgating in Polaris-10/11
authorMaruthi Srinivas Bayyavarapu <Maruthi.Bayyavarapu@amd.com>
Thu, 17 Nov 2016 11:59:50 +0000 (17:29 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 6 Dec 2016 23:08:26 +0000 (18:08 -0500)
VCE clocks are set to be disabled, when not in use.

Signed-off-by: Maruthi Bayyavarapu <maruthi.bayyavarapu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/vce_v3_0.c
drivers/gpu/drm/amd/amdgpu/vi.c

index 39f03f137a565c979a01f72f1a2588655d69183e..6b3293a1c7b8b92d9d47d780de7c883a0beac195 100644 (file)
@@ -134,7 +134,7 @@ static void vce_v3_0_set_vce_sw_clock_gating(struct amdgpu_device *adev,
           accessible but the firmware will throttle the clocks on the
           fly as necessary.
        */
-       if (gated) {
+       if (!gated) {
                data = RREG32(mmVCE_CLOCK_GATING_B);
                data |= 0x1ff;
                data &= ~0xef0000;
index 243dcf7bae47b2ac12930d368d3b9499d83da3a2..9f771f4ffcb71bf1267ff3aae9c5853fb944e149 100644 (file)
@@ -937,12 +937,14 @@ static int vi_common_early_init(void *handle)
                adev->external_rev_id = adev->rev_id + 0x14;
                break;
        case CHIP_POLARIS11:
-               adev->cg_flags = AMD_CG_SUPPORT_UVD_MGCG;
+               adev->cg_flags = AMD_CG_SUPPORT_UVD_MGCG |
+                       AMD_CG_SUPPORT_VCE_MGCG;
                adev->pg_flags = 0;
                adev->external_rev_id = adev->rev_id + 0x5A;
                break;
        case CHIP_POLARIS10:
-               adev->cg_flags = AMD_CG_SUPPORT_UVD_MGCG;
+               adev->cg_flags = AMD_CG_SUPPORT_UVD_MGCG |
+                       AMD_CG_SUPPORT_VCE_MGCG;
                adev->pg_flags = 0;
                adev->external_rev_id = adev->rev_id + 0x50;
                break;