]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amd/pm: Remove redundant function members of pptable_funcs
authorMa Jun <Jun.Ma2@amd.com>
Fri, 3 Nov 2023 05:41:42 +0000 (13:41 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 13 Dec 2023 20:09:53 +0000 (15:09 -0500)
Remove redundant functions members of pptable_funcs and change
the function type as static because they are not called by other
files.

Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h
drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c

index 48f5926d8153525b8667a49d082eddbd9d2c5b38..5e7b8f29fecce9e726f92375959db4984ea578f1 100644 (file)
@@ -212,10 +212,6 @@ int smu_v13_0_get_max_sustainable_clocks_by_dc(struct smu_context *smu,
 
 bool smu_v13_0_baco_is_support(struct smu_context *smu);
 
-enum smu_baco_state smu_v13_0_baco_get_state(struct smu_context *smu);
-
-int smu_v13_0_baco_set_state(struct smu_context *smu, enum smu_baco_state state);
-
 int smu_v13_0_baco_enter(struct smu_context *smu);
 int smu_v13_0_baco_exit(struct smu_context *smu);
 
index 2cb6b68222babffe9eebb45a081bbface1db4fe7..4cd43bbec910e351eb27a79b4c39308d6462d196 100644 (file)
@@ -2407,8 +2407,6 @@ static const struct pptable_funcs arcturus_ppt_funcs = {
        .set_azalia_d3_pme = smu_v11_0_set_azalia_d3_pme,
        .get_max_sustainable_clocks_by_dc = smu_v11_0_get_max_sustainable_clocks_by_dc,
        .baco_is_support = smu_v11_0_baco_is_support,
-       .baco_get_state = smu_v11_0_baco_get_state,
-       .baco_set_state = smu_v11_0_baco_set_state,
        .baco_enter = smu_v11_0_baco_enter,
        .baco_exit = smu_v11_0_baco_exit,
        .get_dpm_ultimate_freq = smu_v11_0_get_dpm_ultimate_freq,
index a38233cc5b7ff8d0baf8280ebecb88a9a3de74ce..8d1d29ffb0f1c54a781c2508447454f9bb7aa5ee 100644 (file)
@@ -3537,8 +3537,6 @@ static const struct pptable_funcs navi10_ppt_funcs = {
        .set_azalia_d3_pme = smu_v11_0_set_azalia_d3_pme,
        .get_max_sustainable_clocks_by_dc = smu_v11_0_get_max_sustainable_clocks_by_dc,
        .baco_is_support = smu_v11_0_baco_is_support,
-       .baco_get_state = smu_v11_0_baco_get_state,
-       .baco_set_state = smu_v11_0_baco_set_state,
        .baco_enter = navi10_baco_enter,
        .baco_exit = navi10_baco_exit,
        .get_dpm_ultimate_freq = smu_v11_0_get_dpm_ultimate_freq,
index 1de9f8b5cc5fa423d4468f31ccf13b6db6caf7c0..21fc033528fa9d1a57ea2699a2780501e2902b3c 100644 (file)
@@ -4428,8 +4428,6 @@ static const struct pptable_funcs sienna_cichlid_ppt_funcs = {
        .set_azalia_d3_pme = smu_v11_0_set_azalia_d3_pme,
        .get_max_sustainable_clocks_by_dc = smu_v11_0_get_max_sustainable_clocks_by_dc,
        .baco_is_support = smu_v11_0_baco_is_support,
-       .baco_get_state = smu_v11_0_baco_get_state,
-       .baco_set_state = smu_v11_0_baco_set_state,
        .baco_enter = sienna_cichlid_baco_enter,
        .baco_exit = sienna_cichlid_baco_exit,
        .mode1_reset_is_support = sienna_cichlid_is_mode1_reset_supported,
index 86fc7273d588834ab5b59068fa72796f58db7549..2877e5da5b5ad202edbcdf18dd3c93163bb76309 100644 (file)
@@ -2221,33 +2221,14 @@ static int smu_v13_0_baco_set_armd3_sequence(struct smu_context *smu,
        return 0;
 }
 
-bool smu_v13_0_baco_is_support(struct smu_context *smu)
-{
-       struct smu_baco_context *smu_baco = &smu->smu_baco;
-
-       if (amdgpu_sriov_vf(smu->adev) ||
-           !smu_baco->platform_support)
-               return false;
-
-       /* return true if ASIC is in BACO state already */
-       if (smu_v13_0_baco_get_state(smu) == SMU_BACO_STATE_ENTER)
-               return true;
-
-       if (smu_cmn_feature_is_supported(smu, SMU_FEATURE_BACO_BIT) &&
-           !smu_cmn_feature_is_enabled(smu, SMU_FEATURE_BACO_BIT))
-               return false;
-
-       return true;
-}
-
-enum smu_baco_state smu_v13_0_baco_get_state(struct smu_context *smu)
+static enum smu_baco_state smu_v13_0_baco_get_state(struct smu_context *smu)
 {
        struct smu_baco_context *smu_baco = &smu->smu_baco;
 
        return smu_baco->state;
 }
 
-int smu_v13_0_baco_set_state(struct smu_context *smu,
+static int smu_v13_0_baco_set_state(struct smu_context *smu,
                             enum smu_baco_state state)
 {
        struct smu_baco_context *smu_baco = &smu->smu_baco;
@@ -2281,6 +2262,24 @@ int smu_v13_0_baco_set_state(struct smu_context *smu,
        return ret;
 }
 
+bool smu_v13_0_baco_is_support(struct smu_context *smu)
+{
+       struct smu_baco_context *smu_baco = &smu->smu_baco;
+
+       if (amdgpu_sriov_vf(smu->adev) || !smu_baco->platform_support)
+               return false;
+
+       /* return true if ASIC is in BACO state already */
+       if (smu_v13_0_baco_get_state(smu) == SMU_BACO_STATE_ENTER)
+               return true;
+
+       if (smu_cmn_feature_is_supported(smu, SMU_FEATURE_BACO_BIT) &&
+           !smu_cmn_feature_is_enabled(smu, SMU_FEATURE_BACO_BIT))
+               return false;
+
+       return true;
+}
+
 int smu_v13_0_baco_enter(struct smu_context *smu)
 {
        struct smu_baco_context *smu_baco = &smu->smu_baco;
index a4debd7ab8bd0a2d94083ec89fb39a95c82b7833..2d25a9e47651f750ce99b9228d1f119d05b42ae8 100644 (file)
@@ -3003,8 +3003,6 @@ static const struct pptable_funcs smu_v13_0_0_ppt_funcs = {
        .deep_sleep_control = smu_v13_0_deep_sleep_control,
        .gfx_ulv_control = smu_v13_0_gfx_ulv_control,
        .baco_is_support = smu_v13_0_baco_is_support,
-       .baco_get_state = smu_v13_0_baco_get_state,
-       .baco_set_state = smu_v13_0_baco_set_state,
        .baco_enter = smu_v13_0_baco_enter,
        .baco_exit = smu_v13_0_baco_exit,
        .mode1_reset_is_support = smu_v13_0_0_is_mode1_reset_supported,
index f5596f031d00c376dcfc85a067668b8ba33e7921..2909ec06b1cb9f68729b4948825b9e54f934da4f 100644 (file)
@@ -2594,8 +2594,6 @@ static const struct pptable_funcs smu_v13_0_7_ppt_funcs = {
        .get_pp_feature_mask = smu_cmn_get_pp_feature_mask,
        .set_pp_feature_mask = smu_cmn_set_pp_feature_mask,
        .baco_is_support = smu_v13_0_baco_is_support,
-       .baco_get_state = smu_v13_0_baco_get_state,
-       .baco_set_state = smu_v13_0_baco_set_state,
        .baco_enter = smu_v13_0_baco_enter,
        .baco_exit = smu_v13_0_baco_exit,
        .mode1_reset_is_support = smu_v13_0_7_is_mode1_reset_supported,