Home
last modified time | relevance | path

Searched refs:smu (Results 1 – 25 of 39) sorted by relevance

12

/Linux-v5.10/drivers/gpu/drm/amd/pm/swsmu/
Dsmu_internal.h30 #define smu_ppt_funcs(intf, ret, smu, args...) \ argument
31 ((smu)->ppt_funcs ? ((smu)->ppt_funcs->intf ? (smu)->ppt_funcs->intf(smu, ##args) : ret) : -EINVAL)
33 #define smu_init_microcode(smu) smu_ppt_funcs(init_microcode, 0, smu) argument
34 #define smu_fini_microcode(smu) smu_ppt_funcs(fini_microcode, 0, smu) argument
35 #define smu_init_smc_tables(smu) smu_ppt_funcs(init_smc_tables, 0, smu) argument
36 #define smu_fini_smc_tables(smu) smu_ppt_funcs(fini_smc_tables, 0, smu) argument
37 #define smu_init_power(smu) smu_ppt_funcs(init_power, 0, smu) argument
38 #define smu_fini_power(smu) smu_ppt_funcs(fini_power, 0, smu) argument
39 #define smu_setup_pptable(smu) smu_ppt_funcs(setup_pptable, 0, smu) argument
40 #define smu_powergate_sdma(smu, gate) smu_ppt_funcs(powergate_sdma, 0, smu, gate) argument
[all …]
Damdgpu_smu.c48 size_t smu_sys_get_pp_feature_mask(struct smu_context *smu, char *buf) in smu_sys_get_pp_feature_mask() argument
52 if (!smu->pm_enabled || !smu->adev->pm.dpm_enabled) in smu_sys_get_pp_feature_mask()
55 mutex_lock(&smu->mutex); in smu_sys_get_pp_feature_mask()
57 size = smu_get_pp_feature_mask(smu, buf); in smu_sys_get_pp_feature_mask()
59 mutex_unlock(&smu->mutex); in smu_sys_get_pp_feature_mask()
64 int smu_sys_set_pp_feature_mask(struct smu_context *smu, uint64_t new_mask) in smu_sys_set_pp_feature_mask() argument
68 if (!smu->pm_enabled || !smu->adev->pm.dpm_enabled) in smu_sys_set_pp_feature_mask()
71 mutex_lock(&smu->mutex); in smu_sys_set_pp_feature_mask()
73 ret = smu_set_pp_feature_mask(smu, new_mask); in smu_sys_set_pp_feature_mask()
75 mutex_unlock(&smu->mutex); in smu_sys_set_pp_feature_mask()
[all …]
Dsmu_cmn.c62 static const char *smu_get_message_name(struct smu_context *smu, in smu_get_message_name() argument
71 static void smu_cmn_send_msg_without_waiting(struct smu_context *smu, in smu_cmn_send_msg_without_waiting() argument
74 struct amdgpu_device *adev = smu->adev; in smu_cmn_send_msg_without_waiting()
79 static void smu_cmn_read_arg(struct smu_context *smu, in smu_cmn_read_arg() argument
82 struct amdgpu_device *adev = smu->adev; in smu_cmn_read_arg()
87 static int smu_cmn_wait_for_response(struct smu_context *smu) in smu_cmn_wait_for_response() argument
89 struct amdgpu_device *adev = smu->adev; in smu_cmn_wait_for_response()
107 int smu_cmn_send_smc_msg_with_param(struct smu_context *smu, in smu_cmn_send_smc_msg_with_param() argument
112 struct amdgpu_device *adev = smu->adev; in smu_cmn_send_smc_msg_with_param()
115 if (smu->adev->in_pci_err_recovery) in smu_cmn_send_smc_msg_with_param()
[all …]
Dsmu_cmn.h29 int smu_cmn_send_smc_msg_with_param(struct smu_context *smu,
34 int smu_cmn_send_smc_msg(struct smu_context *smu,
38 int smu_cmn_to_asic_specific_index(struct smu_context *smu,
42 int smu_cmn_feature_is_supported(struct smu_context *smu,
45 int smu_cmn_feature_is_enabled(struct smu_context *smu,
48 bool smu_cmn_clk_dpm_is_enabled(struct smu_context *smu,
51 int smu_cmn_get_enabled_mask(struct smu_context *smu,
55 int smu_cmn_feature_update_enable_state(struct smu_context *smu,
59 int smu_cmn_feature_set_enabled(struct smu_context *smu,
63 size_t smu_cmn_get_pp_feature_mask(struct smu_context *smu,
[all …]
/Linux-v5.10/drivers/gpu/drm/amd/pm/inc/
Damdgpu_smu.h465 int (*run_btc)(struct smu_context *smu);
466 int (*get_allowed_feature_mask)(struct smu_context *smu, uint32_t *feature_mask, uint32_t num);
467 enum amd_pm_state_type (*get_current_power_state)(struct smu_context *smu);
468 int (*set_default_dpm_table)(struct smu_context *smu);
469 int (*set_power_state)(struct smu_context *smu);
470 int (*populate_umd_state_clk)(struct smu_context *smu);
471 int (*print_clk_levels)(struct smu_context *smu, enum smu_clk_type clk_type, char *buf);
472 int (*force_clk_levels)(struct smu_context *smu, enum smu_clk_type clk_type, uint32_t mask);
473 int (*set_default_od8_settings)(struct smu_context *smu);
474 int (*get_od_percentage)(struct smu_context *smu, enum smu_clk_type clk_type);
[all …]
Dsmu_v11_0.h139 int smu_v11_0_init_microcode(struct smu_context *smu);
141 void smu_v11_0_fini_microcode(struct smu_context *smu);
143 int smu_v11_0_load_microcode(struct smu_context *smu);
145 int smu_v11_0_init_smc_tables(struct smu_context *smu);
147 int smu_v11_0_fini_smc_tables(struct smu_context *smu);
149 int smu_v11_0_init_power(struct smu_context *smu);
151 int smu_v11_0_fini_power(struct smu_context *smu);
153 int smu_v11_0_check_fw_status(struct smu_context *smu);
155 int smu_v11_0_setup_pptable(struct smu_context *smu);
157 int smu_v11_0_get_vbios_bootup_values(struct smu_context *smu);
[all …]
Dsmu_v12_0.h36 int smu_v12_0_check_fw_status(struct smu_context *smu);
38 int smu_v12_0_check_fw_version(struct smu_context *smu);
40 int smu_v12_0_powergate_sdma(struct smu_context *smu, bool gate);
42 int smu_v12_0_powergate_vcn(struct smu_context *smu, bool gate);
44 int smu_v12_0_powergate_jpeg(struct smu_context *smu, bool gate);
46 int smu_v12_0_set_gfx_cgpg(struct smu_context *smu, bool enable);
48 uint32_t smu_v12_0_get_gfxoff_status(struct smu_context *smu);
50 int smu_v12_0_gfx_off_control(struct smu_context *smu, bool enable);
52 int smu_v12_0_fini_smc_tables(struct smu_context *smu);
54 int smu_v12_0_set_default_dpm_tables(struct smu_context *smu);
[all …]
/Linux-v5.10/drivers/gpu/drm/amd/pm/swsmu/smu11/
Dsmu_v11_0.c83 int smu_v11_0_init_microcode(struct smu_context *smu) in smu_v11_0_init_microcode() argument
85 struct amdgpu_device *adev = smu->adev; in smu_v11_0_init_microcode()
149 void smu_v11_0_fini_microcode(struct smu_context *smu) in smu_v11_0_fini_microcode() argument
151 struct amdgpu_device *adev = smu->adev; in smu_v11_0_fini_microcode()
158 int smu_v11_0_load_microcode(struct smu_context *smu) in smu_v11_0_load_microcode() argument
160 struct amdgpu_device *adev = smu->adev; in smu_v11_0_load_microcode()
198 int smu_v11_0_check_fw_status(struct smu_context *smu) in smu_v11_0_check_fw_status() argument
200 struct amdgpu_device *adev = smu->adev; in smu_v11_0_check_fw_status()
213 int smu_v11_0_check_fw_version(struct smu_context *smu) in smu_v11_0_check_fw_version() argument
220 ret = smu_cmn_get_smc_version(smu, &if_version, &smu_version); in smu_v11_0_check_fw_version()
[all …]
Dsienna_cichlid_ppt.c225 sienna_cichlid_get_allowed_feature_mask(struct smu_context *smu, in sienna_cichlid_get_allowed_feature_mask() argument
228 struct amdgpu_device *adev = smu->adev; in sienna_cichlid_get_allowed_feature_mask()
284 if (smu->adev->pg_flags & AMD_PG_SUPPORT_ATHUB) in sienna_cichlid_get_allowed_feature_mask()
287 if (smu->adev->pg_flags & AMD_PG_SUPPORT_MMHUB) in sienna_cichlid_get_allowed_feature_mask()
290 if (smu->adev->pg_flags & AMD_PG_SUPPORT_VCN || in sienna_cichlid_get_allowed_feature_mask()
291 smu->adev->pg_flags & AMD_PG_SUPPORT_JPEG) in sienna_cichlid_get_allowed_feature_mask()
297 static int sienna_cichlid_check_powerplay_table(struct smu_context *smu) in sienna_cichlid_check_powerplay_table() argument
299 struct smu_table_context *table_context = &smu->smu_table; in sienna_cichlid_check_powerplay_table()
302 struct smu_baco_context *smu_baco = &smu->smu_baco; in sienna_cichlid_check_powerplay_table()
314 static int sienna_cichlid_append_powerplay_table(struct smu_context *smu) in sienna_cichlid_append_powerplay_table() argument
[all …]
Darcturus_ppt.c213 static int arcturus_tables_init(struct smu_context *smu) in arcturus_tables_init() argument
215 struct smu_table_context *smu_table = &smu->smu_table; in arcturus_tables_init()
249 static int arcturus_allocate_dpm_context(struct smu_context *smu) in arcturus_allocate_dpm_context() argument
251 struct smu_dpm_context *smu_dpm = &smu->smu_dpm; in arcturus_allocate_dpm_context()
272 static int arcturus_init_smc_tables(struct smu_context *smu) in arcturus_init_smc_tables() argument
276 ret = arcturus_tables_init(smu); in arcturus_init_smc_tables()
280 ret = arcturus_allocate_dpm_context(smu); in arcturus_init_smc_tables()
284 return smu_v11_0_init_smc_tables(smu); in arcturus_init_smc_tables()
288 arcturus_get_allowed_feature_mask(struct smu_context *smu, in arcturus_get_allowed_feature_mask() argument
300 static int arcturus_set_default_dpm_table(struct smu_context *smu) in arcturus_set_default_dpm_table() argument
[all …]
Dnavi10_ppt.c239 static bool is_asic_secure(struct smu_context *smu) in is_asic_secure() argument
241 struct amdgpu_device *adev = smu->adev; in is_asic_secure()
255 navi10_get_allowed_feature_mask(struct smu_context *smu, in navi10_get_allowed_feature_mask() argument
258 struct amdgpu_device *adev = smu->adev; in navi10_get_allowed_feature_mask()
304 if (smu->adev->pg_flags & AMD_PG_SUPPORT_MMHUB) in navi10_get_allowed_feature_mask()
307 if (smu->adev->pg_flags & AMD_PG_SUPPORT_ATHUB) in navi10_get_allowed_feature_mask()
310 if (smu->adev->pg_flags & AMD_PG_SUPPORT_VCN) in navi10_get_allowed_feature_mask()
313 if (smu->adev->pg_flags & AMD_PG_SUPPORT_JPEG) in navi10_get_allowed_feature_mask()
316 if (smu->dc_controlled_by_gpio) in navi10_get_allowed_feature_mask()
323 if (!(is_asic_secure(smu) && in navi10_get_allowed_feature_mask()
[all …]
Dsienna_cichlid_ppt.h32 extern void sienna_cichlid_set_ppt_funcs(struct smu_context *smu);
/Linux-v5.10/drivers/gpu/drm/amd/pm/swsmu/smu12/
Dsmu_v12_0.c57 int smu_v12_0_check_fw_status(struct smu_context *smu) in smu_v12_0_check_fw_status() argument
59 struct amdgpu_device *adev = smu->adev; in smu_v12_0_check_fw_status()
72 int smu_v12_0_check_fw_version(struct smu_context *smu) in smu_v12_0_check_fw_version() argument
79 ret = smu_cmn_get_smc_version(smu, &if_version, &smu_version); in smu_v12_0_check_fw_version()
95 if (if_version != smu->smc_driver_if_version) { in smu_v12_0_check_fw_version()
96 dev_info(smu->adev->dev, "smu driver if version = 0x%08x, smu fw if version = 0x%08x, " in smu_v12_0_check_fw_version()
98 smu->smc_driver_if_version, if_version, in smu_v12_0_check_fw_version()
100 dev_warn(smu->adev->dev, "SMU driver if version not matched\n"); in smu_v12_0_check_fw_version()
106 int smu_v12_0_powergate_sdma(struct smu_context *smu, bool gate) in smu_v12_0_powergate_sdma() argument
108 if (!smu->is_apu) in smu_v12_0_powergate_sdma()
[all …]
Drenoir_ppt.c131 static int renoir_init_smc_tables(struct smu_context *smu) in renoir_init_smc_tables() argument
133 struct smu_table_context *smu_table = &smu->smu_table; in renoir_init_smc_tables()
177 static int renoir_get_dpm_clk_limited(struct smu_context *smu, enum smu_clk_type clk_type, in renoir_get_dpm_clk_limited() argument
180 DpmClocks_t *clk_table = smu->smu_table.clocks_table; in renoir_get_dpm_clk_limited()
213 static int renoir_get_profiling_clk_mask(struct smu_context *smu, in renoir_get_profiling_clk_mask() argument
243 static int renoir_get_dpm_ultimate_freq(struct smu_context *smu, in renoir_get_dpm_ultimate_freq() argument
252 if (!smu_cmn_clk_dpm_is_enabled(smu, clk_type)) { in renoir_get_dpm_ultimate_freq()
256 clock_limit = smu->smu_table.boot_values.uclk; in renoir_get_dpm_ultimate_freq()
260 clock_limit = smu->smu_table.boot_values.gfxclk; in renoir_get_dpm_ultimate_freq()
263 clock_limit = smu->smu_table.boot_values.socclk; in renoir_get_dpm_ultimate_freq()
[all …]
/Linux-v5.10/drivers/macintosh/
Dsmu.c99 static struct smu_device *smu; variable
115 if (list_empty(&smu->cmd_list)) in smu_start_cmd()
119 cmd = list_entry(smu->cmd_list.next, struct smu_cmd, link); in smu_start_cmd()
120 smu->cmd_cur = cmd; in smu_start_cmd()
128 smu->cmd_buf->cmd = cmd->cmd; in smu_start_cmd()
129 smu->cmd_buf->length = cmd->data_len; in smu_start_cmd()
130 memcpy(smu->cmd_buf->data, cmd->data_buf, cmd->data_len); in smu_start_cmd()
133 faddr = (unsigned long)smu->cmd_buf; in smu_start_cmd()
134 fend = faddr + smu->cmd_buf->length + 2; in smu_start_cmd()
147 if (smu->broken_nap) in smu_start_cmd()
[all …]
Dwindfarm_smu_controls.c258 struct device_node *smu, *fans, *fan; in smu_controls_init() local
263 smu = of_find_node_by_type(NULL, "smu"); in smu_controls_init()
264 if (smu == NULL) in smu_controls_init()
268 for (fans = NULL; (fans = of_get_next_child(smu, fans)) != NULL;) in smu_controls_init()
288 for (fans = NULL; (fans = of_get_next_child(smu, fans)) != NULL;) in smu_controls_init()
304 of_node_put(smu); in smu_controls_init()
Dwindfarm_smu_sensors.c410 struct device_node *smu, *sensors, *s; in smu_sensors_init() local
419 smu = of_find_node_by_type(NULL, "smu"); in smu_sensors_init()
420 if (smu == NULL) in smu_sensors_init()
424 for_each_child_of_node(smu, sensors) in smu_sensors_init()
428 of_node_put(smu); in smu_sensors_init()
/Linux-v5.10/drivers/gpu/drm/amd/display/amdgpu_dm/
Damdgpu_dm_pp_smu.c43 struct smu_context *smu = &adev->smu; in dm_pp_apply_display_requirements() local
109 else if (adev->smu.ppt_funcs) in dm_pp_apply_display_requirements()
110 smu_display_configuration_change(smu, in dm_pp_apply_display_requirements()
349 } else if (adev->smu.ppt_funcs && adev->smu.ppt_funcs->get_clock_by_type) { in dm_pp_get_clock_levels_by_type()
350 if (smu_get_clock_by_type(&adev->smu, in dm_pp_get_clock_levels_by_type()
369 } else if (adev->smu.ppt_funcs && adev->smu.ppt_funcs->get_max_high_clocks) { in dm_pp_get_clock_levels_by_type()
370 if (smu_get_max_high_clocks(&adev->smu, &validation_clks)) { in dm_pp_get_clock_levels_by_type()
434 } else if (adev->smu.ppt_funcs && adev->smu.ppt_funcs->get_clock_by_type_with_latency) { in dm_pp_get_clock_levels_by_type_with_latency()
435 if (smu_get_clock_by_type_with_latency(&adev->smu, in dm_pp_get_clock_levels_by_type_with_latency()
464 } else if (adev->smu.ppt_funcs && adev->smu.ppt_funcs->get_clock_by_type_with_voltage) { in dm_pp_get_clock_levels_by_type_with_voltage()
[all …]
/Linux-v5.10/arch/arm/mach-shmobile/
Dsmp-emev2.c32 void __iomem *smu; in emev2_smp_prepare_cpus() local
35 smu = ioremap(EMEV2_SMU_BASE, PAGE_SIZE); in emev2_smp_prepare_cpus()
36 if (smu) { in emev2_smp_prepare_cpus()
37 iowrite32(__pa(shmobile_boot_vector), smu + SMU_GENERAL_REG0); in emev2_smp_prepare_cpus()
38 iounmap(smu); in emev2_smp_prepare_cpus()
/Linux-v5.10/arch/arm/boot/dts/
Demev2.dtsi61 compatible = "renesas,emev2-smu";
72 compatible = "renesas,emev2-smu-clkdiv";
78 compatible = "renesas,emev2-smu-gclk";
84 compatible = "renesas,emev2-smu-clkdiv";
90 compatible = "renesas,emev2-smu-gclk";
103 compatible = "renesas,emev2-smu-clkdiv";
109 compatible = "renesas,emev2-smu-clkdiv";
115 compatible = "renesas,emev2-smu-clkdiv";
121 compatible = "renesas,emev2-smu-clkdiv";
127 compatible = "renesas,emev2-smu-gclk";
[all …]
/Linux-v5.10/Documentation/devicetree/bindings/clock/
Drenesas,emev2-smu.txt10 - compatible: Should be "renesas,emev2-smu"
21 - compatible: Should be "renesas,emev2-smu-clkdiv"
32 - compatible: Should be "renesas,emev2-smu-gclk"
40 compatible = "renesas,emev2-smu-clkdiv";
47 compatible = "renesas,emev2-smu-gclk";
68 smu@e0110000 {
69 compatible = "renesas,emev2-smu";
87 compatible = "renesas,emev2-smu-clkdiv";
93 compatible = "renesas,emev2-smu-gclk";
/Linux-v5.10/drivers/mtd/nand/raw/atmel/
Dpmecc.c175 s16 *smu; member
374 user->smu = user->lmu + (req->ecc.strength + 1); in atmel_pmecc_create_user()
375 user->mu = (s32 *)PTR_ALIGN(user->smu + in atmel_pmecc_create_user()
502 s16 *smu = user->smu; in atmel_pmecc_get_sigma() local
516 memset(smu, 0, sizeof(s16) * num); in atmel_pmecc_get_sigma()
517 smu[0] = 1; in atmel_pmecc_get_sigma()
530 memset(&smu[num], 0, sizeof(s16) * num); in atmel_pmecc_get_sigma()
531 smu[num] = 1; in atmel_pmecc_get_sigma()
542 memset(&smu[(strength + 1) * num], 0, sizeof(s16) * num); in atmel_pmecc_get_sigma()
559 smu[(strength + 1) * num + j] = in atmel_pmecc_get_sigma()
[all …]
/Linux-v5.10/drivers/gpu/drm/amd/pm/
Damdgpu_dpm.c917 ret = smu_get_dpm_freq_range(&adev->smu, SMU_GFXCLK, in amdgpu_dpm_get_sclk()
934 ret = smu_get_dpm_freq_range(&adev->smu, SMU_UCLK, in amdgpu_dpm_get_mclk()
955 ret = smu_dpm_set_power_gate(&adev->smu, block_type, gate); in amdgpu_dpm_set_powergating_by_smu()
994 ret = smu_dpm_set_power_gate(&adev->smu, block_type, gate); in amdgpu_dpm_set_powergating_by_smu()
1002 ret = smu_dpm_set_power_gate(&adev->smu, block_type, gate); in amdgpu_dpm_set_powergating_by_smu()
1022 struct smu_context *smu = &adev->smu; in amdgpu_dpm_baco_enter() local
1026 ret = smu_baco_enter(smu); in amdgpu_dpm_baco_enter()
1042 struct smu_context *smu = &adev->smu; in amdgpu_dpm_baco_exit() local
1046 ret = smu_baco_exit(smu); in amdgpu_dpm_baco_exit()
1064 ret = smu_set_mp1_state(&adev->smu, mp1_state); in amdgpu_dpm_set_mp1_state()
[all …]
Damdgpu_pm.c134 if (adev->smu.ppt_funcs->get_current_power_state) in amdgpu_get_power_dpm_state()
135 pm = smu_get_current_power_state(&adev->smu); in amdgpu_get_power_dpm_state()
278 level = smu_get_performance_level(&adev->smu); in amdgpu_get_power_dpm_force_performance_level()
342 current_level = smu_get_performance_level(&adev->smu); in amdgpu_set_power_dpm_force_performance_level()
374 ret = smu_force_performance_level(&adev->smu, level); in amdgpu_set_power_dpm_force_performance_level()
424 ret = smu_get_power_num_states(&adev->smu, &data); in amdgpu_get_pp_num_states()
454 struct smu_context *smu = &adev->smu; in amdgpu_get_pp_cur_state() local
468 pm = smu_get_current_power_state(smu); in amdgpu_get_pp_cur_state()
469 ret = smu_get_power_num_states(smu, &data); in amdgpu_get_pp_cur_state()
589 size = smu_sys_get_pp_table(&adev->smu, (void **)&table); in amdgpu_get_pp_table()
[all …]
/Linux-v5.10/drivers/gpu/drm/amd/amdgpu/
Dnv.c309 struct smu_context *smu = &adev->smu; in nv_asic_supports_baco() local
311 if (smu_baco_is_support(smu)) in nv_asic_supports_baco()
320 struct smu_context *smu = &adev->smu; in nv_asic_reset_method() local
335 if (smu_baco_is_support(smu)) in nv_asic_reset_method()
345 struct smu_context *smu = &adev->smu; in nv_asic_reset() local
350 ret = smu_baco_enter(smu); in nv_asic_reset()
353 ret = smu_baco_exit(smu); in nv_asic_reset()

12