summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
diff options
context:
space:
mode:
authorLijo Lazar <lijo.lazar@amd.com>2026-01-19 12:19:40 +0530
committerAlex Deucher <alexander.deucher@amd.com>2026-01-29 12:26:48 -0500
commit0d9a49a2ce4738bb802cfc0c9ca5abdecd36e96e (patch)
tree14a573eb10c90b256f77d9de1277661f7d0c1cfa /drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
parent156c0ab1de4e917b106deb63cd7583fa45d7ce29 (diff)
downloadlinux-next-0d9a49a2ce4738bb802cfc0c9ca5abdecd36e96e.tar.gz
linux-next-0d9a49a2ce4738bb802cfc0c9ca5abdecd36e96e.zip
drm/amd/pm: Initialize allowed feature list
Instead of returning feature bit mask of allowed features, initialize the allowed features in the callback implementation itself. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Asad Kamal <asad.kamal@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c')
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index b635792f5906..75897ac203c3 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -691,11 +691,8 @@ static int smu_sys_set_pp_table(void *handle,
return ret;
}
-static int smu_get_driver_allowed_feature_mask(struct smu_context *smu)
+static int smu_init_driver_allowed_feature_mask(struct smu_context *smu)
{
- uint32_t allowed_feature_mask[SMU_FEATURE_MAX/32];
- int ret = 0;
-
/*
* With SCPM enabled, the allowed featuremasks setting(via
* PPSMC_MSG_SetAllowedFeaturesMaskLow/High) is not permitted.
@@ -710,15 +707,7 @@ static int smu_get_driver_allowed_feature_mask(struct smu_context *smu)
smu_feature_list_clear_all(smu, SMU_FEATURE_LIST_ALLOWED);
- ret = smu_get_allowed_feature_mask(smu, allowed_feature_mask,
- SMU_FEATURE_MAX/32);
- if (ret)
- return ret;
-
- smu_feature_list_add_bits(smu, SMU_FEATURE_LIST_ALLOWED,
- (unsigned long *)allowed_feature_mask);
-
- return ret;
+ return smu_init_allowed_features(smu);
}
static int smu_set_funcs(struct amdgpu_device *adev)
@@ -1949,7 +1938,7 @@ static int smu_hw_init(struct amdgpu_ip_block *ip_block)
if (!smu->pm_enabled)
return 0;
- ret = smu_get_driver_allowed_feature_mask(smu);
+ ret = smu_init_driver_allowed_feature_mask(smu);
if (ret)
return ret;