drm/amd/powerplay: enable athub pg
authorKenneth Feng <kenneth.feng@amd.com>
Thu, 26 Mar 2020 04:01:15 +0000 (12:01 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Jul 2020 05:59:11 +0000 (01:59 -0400)
enable athub pg and the status can be checked in
ATHUB_MISC_CNTL.

Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Reviewed-by: Likun Gao <Likun.Gao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/nv.c
drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c

index f4d4d91ebee275589b33f6ddbd176020b0fa55e4..6ca4c6f043c69d179fc0c7a3227941722dd8f3fa 100644 (file)
@@ -725,7 +725,8 @@ static int nv_common_early_init(void *handle)
                        AMD_CG_SUPPORT_IH_CG |
                        AMD_CG_SUPPORT_MC_LS;
                adev->pg_flags = AMD_PG_SUPPORT_VCN |
-                       AMD_PG_SUPPORT_JPEG;
+                       AMD_PG_SUPPORT_JPEG |
+                       AMD_PG_SUPPORT_ATHUB;
                adev->external_rev_id = adev->rev_id + 0x28;
                break;
        default:
index 2843e1be4289225fc35d8e240d018f2077ab8647..f7e67c446ae04e690a01943ae9f9b1f2789ca872 100644 (file)
@@ -332,6 +332,9 @@ sienna_cichlid_get_allowed_feature_mask(struct smu_context *smu,
        if (adev->pm.pp_feature & PP_SCLK_DEEP_SLEEP_MASK)
                *(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_DS_GFXCLK_BIT);
 
+       if (smu->adev->pg_flags & AMD_PG_SUPPORT_ATHUB)
+               *(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_ATHUB_PG_BIT);
+
        if (smu->adev->pg_flags & AMD_PG_SUPPORT_VCN ||
            smu->adev->pg_flags & AMD_PG_SUPPORT_JPEG)
                *(uint64_t *)feature_mask |= FEATURE_MASK(FEATURE_MM_DPM_PG_BIT);