summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
diff options
context:
space:
mode:
authorEvan Quan <evan.quan@amd.com>2021-12-08 10:00:35 +0300
committerAlex Deucher <alexander.deucher@amd.com>2022-02-08 02:01:16 +0300
commit3c6591e947f5c23c13dec67da3dbff12ccd6e209 (patch)
treefd5506f6b1cc778eddebea3d43012e481f141100 /drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
parent7ade3ca9cdb547eac2cdb661c91a481235e21ae8 (diff)
downloadlinux-3c6591e947f5c23c13dec67da3dbff12ccd6e209.tar.xz
drm/amd/pm: drop the cache for enabled ppfeatures
The following scenarios make the driver cache for enabled ppfeatures outdated and invalid: - Other tools interact with PMFW to change the enabled ppfeatures. - PMFW may enable/disable some features behind driver's back. E.g. for sienna_cichild, on gfxoff entering, PMFW will disable gfx related DPM features. All those are performed without driver's notice. Also considering driver does not actually interact with PMFW such frequently, the benefit brought by such cache is very limited. Signed-off-by: Evan Quan <evan.quan@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c')
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
index d89e8a03651b..e90387a84cbb 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c
@@ -195,27 +195,13 @@ static int yellow_carp_fini_smc_tables(struct smu_context *smu)
static int yellow_carp_system_features_control(struct smu_context *smu, bool en)
{
- struct smu_feature *feature = &smu->smu_feature;
struct amdgpu_device *adev = smu->adev;
- uint64_t feature_mask;
int ret = 0;
if (!en && !adev->in_s0ix)
ret = smu_cmn_send_smc_msg(smu, SMU_MSG_PrepareMp1ForUnload, NULL);
- bitmap_zero(feature->enabled, feature->feature_num);
-
- if (!en)
- return ret;
-
- ret = smu_cmn_get_enabled_mask(smu, &feature_mask);
- if (ret)
- return ret;
-
- bitmap_copy(feature->enabled, (unsigned long *)&feature_mask,
- feature->feature_num);
-
- return 0;
+ return ret;
}
static int yellow_carp_dpm_set_vcn_enable(struct smu_context *smu, bool enable)