drm/amd/powerplay: make mmhub pg bit configured by pg_flags
authorHuang Rui <ray.huang@amd.com>
Fri, 14 Jun 2019 08:12:51 +0000 (16:12 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 25 Jun 2019 18:54:32 +0000 (13:54 -0500)
The mmhub pg features enabling should be indicated by pg_flags.

Reported-by: Lijo Lazar <Lijo.Lazar@amd.com>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/nv.c
drivers/gpu/drm/amd/powerplay/navi10_ppt.c

index 0c837207085e82639909623017277184af5f258a..c8e79dda7daa7c9b7d1781d9d717f981284752ff 100644 (file)
@@ -508,7 +508,8 @@ static int nv_common_early_init(void *handle)
                        AMD_CG_SUPPORT_BIF_MGCG |
                        AMD_CG_SUPPORT_BIF_LS;
                adev->pg_flags = AMD_PG_SUPPORT_VCN |
-                       AMD_PG_SUPPORT_VCN_DPG;
+                       AMD_PG_SUPPORT_VCN_DPG |
+                       AMD_PG_SUPPORT_MMHUB;
                adev->external_rev_id = adev->rev_id + 0x1;
                break;
        default:
index d1246981e3ac0ab9741d412eaaa7209a922fbb94..a83b19697a6d4eae6c1cd7630ca72d7bd341e544 100644 (file)
@@ -325,7 +325,6 @@ navi10_get_allowed_feature_mask(struct smu_context *smu,
                                | FEATURE_MASK(FEATURE_FAN_CONTROL_BIT)
                                | FEATURE_MASK(FEATURE_THERMAL_BIT)
                                | FEATURE_MASK(FEATURE_LED_DISPLAY_BIT)
-                               | FEATURE_MASK(FEATURE_MMHUB_PG_BIT)
                                | FEATURE_MASK(FEATURE_ATHUB_PG_BIT)
                                | FEATURE_MASK(FEATURE_DPM_DCEFCLK_BIT)
                                | FEATURE_MASK(FEATURE_DS_GFXCLK_BIT)
@@ -346,6 +345,9 @@ navi10_get_allowed_feature_mask(struct smu_context *smu,
                *(uint64_t *)feature_mask &= ~FEATURE_MASK(FEATURE_FW_DSTATE_BIT);
        }
 
+       if (smu->adev->pg_flags & AMD_PG_SUPPORT_MMHUB)
+               *(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_MMHUB_PG_BIT);
+
        if (smu->adev->pg_flags & AMD_PG_SUPPORT_VCN)
                *(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_VCN_PG_BIT);