mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
drm/amdgpu/pm: Change the member function name in pp_hwmgr_func and pptable_funcs
Use a unified and more explicit name get_bamaco_support to replace is_baco_support and get_asic_baco_capability Signed-off-by: Ma Jun <Jun.Ma2@amd.com> Suggested-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
e5040d1496
commit
1b19959427
|
|
@ -1379,10 +1379,10 @@ static bool pp_get_asic_baco_capability(void *handle)
|
|||
return false;
|
||||
|
||||
if (!(hwmgr->not_vf && amdgpu_dpm) ||
|
||||
!hwmgr->hwmgr_func->get_asic_baco_capability)
|
||||
!hwmgr->hwmgr_func->get_bamaco_support)
|
||||
return false;
|
||||
|
||||
return hwmgr->hwmgr_func->get_asic_baco_capability(hwmgr);
|
||||
return hwmgr->hwmgr_func->get_bamaco_support(hwmgr);
|
||||
}
|
||||
|
||||
static int pp_get_asic_baco_state(void *handle, int *state)
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
#include "smu/smu_7_1_2_d.h"
|
||||
#include "smu/smu_7_1_2_sh_mask.h"
|
||||
|
||||
bool smu7_baco_get_capability(struct pp_hwmgr *hwmgr)
|
||||
bool smu7_get_bamaco_support(struct pp_hwmgr *hwmgr)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)(hwmgr->adev);
|
||||
uint32_t reg;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#include "hwmgr.h"
|
||||
#include "common_baco.h"
|
||||
|
||||
extern bool smu7_baco_get_capability(struct pp_hwmgr *hwmgr);
|
||||
extern bool smu7_get_bamaco_support(struct pp_hwmgr *hwmgr);
|
||||
extern int smu7_baco_get_state(struct pp_hwmgr *hwmgr, enum BACO_STATE *state);
|
||||
extern int smu7_baco_set_state(struct pp_hwmgr *hwmgr, enum BACO_STATE state);
|
||||
|
||||
|
|
|
|||
|
|
@ -5791,7 +5791,7 @@ static const struct pp_hwmgr_func smu7_hwmgr_funcs = {
|
|||
.get_power_profile_mode = smu7_get_power_profile_mode,
|
||||
.set_power_profile_mode = smu7_set_power_profile_mode,
|
||||
.get_performance_level = smu7_get_performance_level,
|
||||
.get_asic_baco_capability = smu7_baco_get_capability,
|
||||
.get_bamaco_support = smu7_get_bamaco_support,
|
||||
.get_asic_baco_state = smu7_baco_get_state,
|
||||
.set_asic_baco_state = smu7_baco_set_state,
|
||||
.power_off_asic = smu7_power_off_asic,
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#include "vega10_inc.h"
|
||||
#include "smu9_baco.h"
|
||||
|
||||
bool smu9_baco_get_capability(struct pp_hwmgr *hwmgr)
|
||||
bool smu9_get_bamaco_support(struct pp_hwmgr *hwmgr)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)(hwmgr->adev);
|
||||
uint32_t reg, data;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#include "hwmgr.h"
|
||||
#include "common_baco.h"
|
||||
|
||||
extern bool smu9_baco_get_capability(struct pp_hwmgr *hwmgr);
|
||||
extern bool smu9_get_bamaco_support(struct pp_hwmgr *hwmgr);
|
||||
extern int smu9_baco_get_state(struct pp_hwmgr *hwmgr, enum BACO_STATE *state);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -5756,7 +5756,7 @@ static const struct pp_hwmgr_func vega10_hwmgr_funcs = {
|
|||
.set_power_limit = vega10_set_power_limit,
|
||||
.odn_edit_dpm_table = vega10_odn_edit_dpm_table,
|
||||
.get_performance_level = vega10_get_performance_level,
|
||||
.get_asic_baco_capability = smu9_baco_get_capability,
|
||||
.get_bamaco_support = smu9_get_bamaco_support,
|
||||
.get_asic_baco_state = smu9_baco_get_state,
|
||||
.set_asic_baco_state = vega10_baco_set_state,
|
||||
.enable_mgpu_fan_boost = vega10_enable_mgpu_fan_boost,
|
||||
|
|
|
|||
|
|
@ -2966,7 +2966,7 @@ static const struct pp_hwmgr_func vega12_hwmgr_funcs = {
|
|||
.start_thermal_controller = vega12_start_thermal_controller,
|
||||
.powergate_gfx = vega12_gfx_off_control,
|
||||
.get_performance_level = vega12_get_performance_level,
|
||||
.get_asic_baco_capability = smu9_baco_get_capability,
|
||||
.get_bamaco_support = smu9_get_bamaco_support,
|
||||
.get_asic_baco_state = smu9_baco_get_state,
|
||||
.set_asic_baco_state = vega12_baco_set_state,
|
||||
.get_ppfeature_status = vega12_get_ppfeature_status,
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ static const struct soc15_baco_cmd_entry clean_baco_tbl[] = {
|
|||
{CMD_WRITE, SOC15_REG_ENTRY(NBIF, 0, mmBIOS_SCRATCH_7), 0, 0, 0, 0},
|
||||
};
|
||||
|
||||
bool vega20_baco_get_capability(struct pp_hwmgr *hwmgr)
|
||||
bool vega20_get_bamaco_support(struct pp_hwmgr *hwmgr)
|
||||
{
|
||||
struct amdgpu_device *adev = (struct amdgpu_device *)(hwmgr->adev);
|
||||
uint32_t reg;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#include "hwmgr.h"
|
||||
#include "common_baco.h"
|
||||
|
||||
extern bool vega20_baco_get_capability(struct pp_hwmgr *hwmgr);
|
||||
extern bool vega20_get_bamaco_support(struct pp_hwmgr *hwmgr);
|
||||
extern int vega20_baco_get_state(struct pp_hwmgr *hwmgr, enum BACO_STATE *state);
|
||||
extern int vega20_baco_set_state(struct pp_hwmgr *hwmgr, enum BACO_STATE state);
|
||||
extern int vega20_baco_apply_vdci_flush_workaround(struct pp_hwmgr *hwmgr);
|
||||
|
|
|
|||
|
|
@ -4422,7 +4422,7 @@ static const struct pp_hwmgr_func vega20_hwmgr_funcs = {
|
|||
.notify_cac_buffer_info = vega20_notify_cac_buffer_info,
|
||||
.enable_mgpu_fan_boost = vega20_enable_mgpu_fan_boost,
|
||||
/* BACO related */
|
||||
.get_asic_baco_capability = vega20_baco_get_capability,
|
||||
.get_bamaco_support = vega20_get_bamaco_support,
|
||||
.get_asic_baco_state = vega20_baco_get_state,
|
||||
.set_asic_baco_state = vega20_baco_set_state,
|
||||
.set_mp1_state = vega20_set_mp1_state,
|
||||
|
|
|
|||
|
|
@ -351,7 +351,7 @@ struct pp_hwmgr_func {
|
|||
int (*set_hard_min_fclk_by_freq)(struct pp_hwmgr *hwmgr, uint32_t clock);
|
||||
int (*set_hard_min_gfxclk_by_freq)(struct pp_hwmgr *hwmgr, uint32_t clock);
|
||||
int (*set_soft_max_gfxclk_by_freq)(struct pp_hwmgr *hwmgr, uint32_t clock);
|
||||
bool (*get_asic_baco_capability)(struct pp_hwmgr *hwmgr);
|
||||
bool (*get_bamaco_support)(struct pp_hwmgr *hwmgr);
|
||||
int (*get_asic_baco_state)(struct pp_hwmgr *hwmgr, enum BACO_STATE *state);
|
||||
int (*set_asic_baco_state)(struct pp_hwmgr *hwmgr, enum BACO_STATE state);
|
||||
int (*get_ppfeature_status)(struct pp_hwmgr *hwmgr, char *buf);
|
||||
|
|
|
|||
|
|
@ -3230,10 +3230,10 @@ static bool smu_get_baco_capability(void *handle)
|
|||
if (!smu->pm_enabled)
|
||||
return false;
|
||||
|
||||
if (!smu->ppt_funcs || !smu->ppt_funcs->baco_is_support)
|
||||
if (!smu->ppt_funcs || !smu->ppt_funcs->get_bamaco_support)
|
||||
return false;
|
||||
|
||||
return smu->ppt_funcs->baco_is_support(smu);
|
||||
return smu->ppt_funcs->get_bamaco_support(smu);
|
||||
}
|
||||
|
||||
static int smu_baco_set_state(void *handle, int state)
|
||||
|
|
|
|||
|
|
@ -1174,9 +1174,11 @@ struct pptable_funcs {
|
|||
int (*get_max_sustainable_clocks_by_dc)(struct smu_context *smu, struct pp_smu_nv_clock_table *max_clocks);
|
||||
|
||||
/**
|
||||
* @baco_is_support: Check if GPU supports BACO (Bus Active, Chip Off).
|
||||
* @get_bamaco_support: Check if GPU supports BACO/MACO
|
||||
* BACO: Bus Active, Chip Off
|
||||
* MACO: Memory Active, Chip Off
|
||||
*/
|
||||
bool (*baco_is_support)(struct smu_context *smu);
|
||||
bool (*get_bamaco_support)(struct smu_context *smu);
|
||||
|
||||
/**
|
||||
* @baco_get_state: Get the current BACO state.
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ int smu_v11_0_set_azalia_d3_pme(struct smu_context *smu);
|
|||
int smu_v11_0_get_max_sustainable_clocks_by_dc(struct smu_context *smu,
|
||||
struct pp_smu_nv_clock_table *max_clocks);
|
||||
|
||||
bool smu_v11_0_baco_is_support(struct smu_context *smu);
|
||||
bool smu_v11_0_get_bamaco_support(struct smu_context *smu);
|
||||
|
||||
enum smu_baco_state smu_v11_0_baco_get_state(struct smu_context *smu);
|
||||
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ int smu_v13_0_set_azalia_d3_pme(struct smu_context *smu);
|
|||
int smu_v13_0_get_max_sustainable_clocks_by_dc(struct smu_context *smu,
|
||||
struct pp_smu_nv_clock_table *max_clocks);
|
||||
|
||||
bool smu_v13_0_baco_is_support(struct smu_context *smu);
|
||||
bool smu_v13_0_get_bamaco_support(struct smu_context *smu);
|
||||
|
||||
int smu_v13_0_baco_enter(struct smu_context *smu);
|
||||
int smu_v13_0_baco_exit(struct smu_context *smu);
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ int smu_v14_0_register_irq_handler(struct smu_context *smu);
|
|||
int smu_v14_0_baco_set_armd3_sequence(struct smu_context *smu,
|
||||
enum smu_baco_seq baco_seq);
|
||||
|
||||
bool smu_v14_0_baco_is_support(struct smu_context *smu);
|
||||
bool smu_v14_0_get_bamaco_support(struct smu_context *smu);
|
||||
|
||||
enum smu_baco_state smu_v14_0_baco_get_state(struct smu_context *smu);
|
||||
|
||||
|
|
|
|||
|
|
@ -2387,7 +2387,7 @@ static const struct pptable_funcs arcturus_ppt_funcs = {
|
|||
.register_irq_handler = smu_v11_0_register_irq_handler,
|
||||
.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,
|
||||
.get_bamaco_support = smu_v11_0_get_bamaco_support,
|
||||
.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,
|
||||
|
|
|
|||
|
|
@ -3538,7 +3538,7 @@ static const struct pptable_funcs navi10_ppt_funcs = {
|
|||
.register_irq_handler = smu_v11_0_register_irq_handler,
|
||||
.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,
|
||||
.get_bamaco_support = smu_v11_0_get_bamaco_support,
|
||||
.baco_enter = navi10_baco_enter,
|
||||
.baco_exit = navi10_baco_exit,
|
||||
.get_dpm_ultimate_freq = smu_v11_0_get_dpm_ultimate_freq,
|
||||
|
|
|
|||
|
|
@ -4431,7 +4431,7 @@ static const struct pptable_funcs sienna_cichlid_ppt_funcs = {
|
|||
.register_irq_handler = smu_v11_0_register_irq_handler,
|
||||
.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,
|
||||
.get_bamaco_support = smu_v11_0_get_bamaco_support,
|
||||
.baco_enter = sienna_cichlid_baco_enter,
|
||||
.baco_exit = sienna_cichlid_baco_exit,
|
||||
.mode1_reset_is_support = sienna_cichlid_is_mode1_reset_supported,
|
||||
|
|
|
|||
|
|
@ -1557,7 +1557,7 @@ int smu_v11_0_baco_set_armd3_sequence(struct smu_context *smu,
|
|||
return smu_cmn_send_smc_msg_with_param(smu, SMU_MSG_ArmD3, baco_seq, NULL);
|
||||
}
|
||||
|
||||
bool smu_v11_0_baco_is_support(struct smu_context *smu)
|
||||
bool smu_v11_0_get_bamaco_support(struct smu_context *smu)
|
||||
{
|
||||
struct smu_baco_context *smu_baco = &smu->smu_baco;
|
||||
|
||||
|
|
|
|||
|
|
@ -1581,7 +1581,7 @@ static void aldebaran_get_unique_id(struct smu_context *smu)
|
|||
adev->unique_id = ((uint64_t)upper32 << 32) | lower32;
|
||||
}
|
||||
|
||||
static bool aldebaran_is_baco_supported(struct smu_context *smu)
|
||||
static bool aldebaran_get_bamaco_support(struct smu_context *smu)
|
||||
{
|
||||
/* aldebaran is not support baco */
|
||||
|
||||
|
|
@ -2059,7 +2059,7 @@ static const struct pptable_funcs aldebaran_ppt_funcs = {
|
|||
.register_irq_handler = smu_v13_0_register_irq_handler,
|
||||
.set_azalia_d3_pme = smu_v13_0_set_azalia_d3_pme,
|
||||
.get_max_sustainable_clocks_by_dc = smu_v13_0_get_max_sustainable_clocks_by_dc,
|
||||
.baco_is_support = aldebaran_is_baco_supported,
|
||||
.get_bamaco_support = aldebaran_get_bamaco_support,
|
||||
.get_dpm_ultimate_freq = smu_v13_0_get_dpm_ultimate_freq,
|
||||
.set_soft_freq_limited_range = aldebaran_set_soft_freq_limited_range,
|
||||
.od_edit_dpm_table = aldebaran_usr_edit_dpm_table,
|
||||
|
|
|
|||
|
|
@ -2268,7 +2268,7 @@ static int smu_v13_0_baco_set_state(struct smu_context *smu,
|
|||
return ret;
|
||||
}
|
||||
|
||||
bool smu_v13_0_baco_is_support(struct smu_context *smu)
|
||||
bool smu_v13_0_get_bamaco_support(struct smu_context *smu)
|
||||
{
|
||||
struct smu_baco_context *smu_baco = &smu->smu_baco;
|
||||
|
||||
|
|
|
|||
|
|
@ -3076,7 +3076,7 @@ static const struct pptable_funcs smu_v13_0_0_ppt_funcs = {
|
|||
.set_tool_table_location = smu_v13_0_set_tool_table_location,
|
||||
.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,
|
||||
.get_bamaco_support = smu_v13_0_get_bamaco_support,
|
||||
.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,
|
||||
|
|
|
|||
|
|
@ -2077,7 +2077,7 @@ static void smu_v13_0_6_get_unique_id(struct smu_context *smu)
|
|||
adev->unique_id = pptable->PublicSerialNumber_AID;
|
||||
}
|
||||
|
||||
static bool smu_v13_0_6_is_baco_supported(struct smu_context *smu)
|
||||
static bool smu_v13_0_6_get_bamaco_support(struct smu_context *smu)
|
||||
{
|
||||
/* smu_13_0_6 does not support baco */
|
||||
|
||||
|
|
@ -3188,7 +3188,7 @@ static const struct pptable_funcs smu_v13_0_6_ppt_funcs = {
|
|||
.enable_thermal_alert = smu_v13_0_enable_thermal_alert,
|
||||
.disable_thermal_alert = smu_v13_0_disable_thermal_alert,
|
||||
.setup_pptable = smu_v13_0_6_setup_pptable,
|
||||
.baco_is_support = smu_v13_0_6_is_baco_supported,
|
||||
.get_bamaco_support = smu_v13_0_6_get_bamaco_support,
|
||||
.get_dpm_ultimate_freq = smu_v13_0_6_get_dpm_ultimate_freq,
|
||||
.set_soft_freq_limited_range = smu_v13_0_6_set_soft_freq_limited_range,
|
||||
.od_edit_dpm_table = smu_v13_0_6_usr_edit_dpm_table,
|
||||
|
|
|
|||
|
|
@ -2650,7 +2650,7 @@ static const struct pptable_funcs smu_v13_0_7_ppt_funcs = {
|
|||
.set_tool_table_location = smu_v13_0_set_tool_table_location,
|
||||
.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,
|
||||
.get_bamaco_support = smu_v13_0_get_bamaco_support,
|
||||
.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,
|
||||
|
|
|
|||
|
|
@ -1590,7 +1590,7 @@ int smu_v14_0_baco_set_armd3_sequence(struct smu_context *smu,
|
|||
return 0;
|
||||
}
|
||||
|
||||
bool smu_v14_0_baco_is_support(struct smu_context *smu)
|
||||
bool smu_v14_0_get_bamaco_support(struct smu_context *smu)
|
||||
{
|
||||
struct smu_baco_context *smu_baco = &smu->smu_baco;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user