drm/amd/pm: don't mark all apu as true on feature mask
authorHuang Rui <ray.huang@amd.com>
Fri, 8 Jan 2021 04:28:51 +0000 (12:28 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 14 Jan 2021 04:47:33 +0000 (23:47 -0500)
VHG based APU will support feature mask checking.

Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c

index e0557c8..d7d86fd 100644 (file)
@@ -273,11 +273,13 @@ int smu_cmn_feature_is_enabled(struct smu_context *smu,
                               enum smu_feature_mask mask)
 {
        struct smu_feature *feature = &smu->smu_feature;
+       struct amdgpu_device *adev = smu->adev;
        int feature_id;
        int ret = 0;
 
-       if (smu->is_apu)
+       if (smu->is_apu && adev->family < AMDGPU_FAMILY_VGH)
                return 1;
+
        feature_id = smu_cmn_to_asic_specific_index(smu,
                                                    CMN2ASIC_MAPPING_FEATURE,
                                                    mask);