Home
last modified time | relevance | path

Searched full:smu (Results 1 – 25 of 203) sorted by relevance

123456789

/Linux-v5.15/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.c53 static int smu_force_smuclk_levels(struct smu_context *smu,
56 static int smu_handle_task(struct smu_context *smu,
60 static int smu_reset(struct smu_context *smu);
62 static int smu_set_fan_control_mode(struct smu_context *smu, int value);
65 static int smu_set_gfx_cgpg(struct smu_context *smu, bool enabled);
70 struct smu_context *smu = handle; in smu_sys_get_pp_feature_mask() local
73 if (!smu->pm_enabled || !smu->adev->pm.dpm_enabled) in smu_sys_get_pp_feature_mask()
76 mutex_lock(&smu->mutex); in smu_sys_get_pp_feature_mask()
78 size = smu_get_pp_feature_mask(smu, buf); in smu_sys_get_pp_feature_mask()
80 mutex_unlock(&smu->mutex); in smu_sys_get_pp_feature_mask()
[all …]
Dsmu_cmn.c62 static const char *smu_get_message_name(struct smu_context *smu, in smu_get_message_name() argument
66 return "unknown smu message"; in smu_get_message_name()
71 static void smu_cmn_read_arg(struct smu_context *smu, in smu_cmn_read_arg() argument
74 struct amdgpu_device *adev = smu->adev; in smu_cmn_read_arg()
79 /* Redefine the SMU error codes here.
82 * when the SMU has exported a unified header file containing these
83 * macros, which header file we can just include and use the SMU's
84 * macros. At the moment, these error codes are defined by the SMU
96 * __smu_cmn_poll_stat -- poll for a status from the SMU
97 * smu: a pointer to SMU context
[all …]
Dsmu_cmn.h29 int smu_cmn_send_msg_without_waiting(struct smu_context *smu,
32 int smu_cmn_send_smc_msg_with_param(struct smu_context *smu,
37 int smu_cmn_send_smc_msg(struct smu_context *smu,
41 int smu_cmn_wait_for_response(struct smu_context *smu);
43 int smu_cmn_to_asic_specific_index(struct smu_context *smu,
47 int smu_cmn_feature_is_supported(struct smu_context *smu,
50 int smu_cmn_feature_is_enabled(struct smu_context *smu,
53 bool smu_cmn_clk_dpm_is_enabled(struct smu_context *smu,
56 int smu_cmn_get_enabled_mask(struct smu_context *smu,
60 int smu_cmn_get_enabled_32_bits_mask(struct smu_context *smu,
[all …]
/Linux-v5.15/drivers/gpu/drm/amd/pm/swsmu/smu13/
Dsmu_v13_0.c78 int smu_v13_0_init_microcode(struct smu_context *smu) in smu_v13_0_init_microcode() argument
80 struct amdgpu_device *adev = smu->adev; in smu_v13_0_init_microcode()
88 /* doesn't need to load smu firmware in IOV mode */ in smu_v13_0_init_microcode()
133 void smu_v13_0_fini_microcode(struct smu_context *smu) in smu_v13_0_fini_microcode() argument
135 struct amdgpu_device *adev = smu->adev; in smu_v13_0_fini_microcode()
142 int smu_v13_0_load_microcode(struct smu_context *smu) in smu_v13_0_load_microcode() argument
145 struct amdgpu_device *adev = smu->adev; in smu_v13_0_load_microcode()
183 int smu_v13_0_check_fw_status(struct smu_context *smu) in smu_v13_0_check_fw_status() argument
185 struct amdgpu_device *adev = smu->adev; in smu_v13_0_check_fw_status()
198 int smu_v13_0_check_fw_version(struct smu_context *smu) in smu_v13_0_check_fw_version() argument
[all …]
Dyellow_carp_ppt.c147 static int yellow_carp_init_smc_tables(struct smu_context *smu) in yellow_carp_init_smc_tables() argument
149 struct smu_table_context *smu_table = &smu->smu_table; in yellow_carp_init_smc_tables()
189 static int yellow_carp_fini_smc_tables(struct smu_context *smu) in yellow_carp_fini_smc_tables() argument
191 struct smu_table_context *smu_table = &smu->smu_table; in yellow_carp_fini_smc_tables()
205 static int yellow_carp_system_features_control(struct smu_context *smu, bool en) in yellow_carp_system_features_control() argument
207 struct smu_feature *feature = &smu->smu_feature; in yellow_carp_system_features_control()
208 struct amdgpu_device *adev = smu->adev; in yellow_carp_system_features_control()
213 ret = smu_cmn_send_smc_msg(smu, SMU_MSG_PrepareMp1ForUnload, NULL); in yellow_carp_system_features_control()
221 ret = smu_cmn_get_enabled_32_bits_mask(smu, feature_mask, 2); in yellow_carp_system_features_control()
233 static int yellow_carp_dpm_set_vcn_enable(struct smu_context *smu, bool enable) in yellow_carp_dpm_set_vcn_enable() argument
[all …]
Daldebaran_ppt.c209 static int aldebaran_tables_init(struct smu_context *smu) in aldebaran_tables_init() argument
211 struct smu_table_context *smu_table = &smu->smu_table; in aldebaran_tables_init()
241 static int aldebaran_allocate_dpm_context(struct smu_context *smu) in aldebaran_allocate_dpm_context() argument
243 struct smu_dpm_context *smu_dpm = &smu->smu_dpm; in aldebaran_allocate_dpm_context()
264 static int aldebaran_init_smc_tables(struct smu_context *smu) in aldebaran_init_smc_tables() argument
268 ret = aldebaran_tables_init(smu); in aldebaran_init_smc_tables()
272 ret = aldebaran_allocate_dpm_context(smu); in aldebaran_init_smc_tables()
276 return smu_v13_0_init_smc_tables(smu); in aldebaran_init_smc_tables()
279 static int aldebaran_get_allowed_feature_mask(struct smu_context *smu, in aldebaran_get_allowed_feature_mask() argument
291 static int aldebaran_set_default_dpm_table(struct smu_context *smu) in aldebaran_set_default_dpm_table() argument
[all …]
/Linux-v5.15/drivers/gpu/drm/amd/pm/swsmu/smu11/
Dvangogh_ppt.c207 static int vangogh_tables_init(struct smu_context *smu) in vangogh_tables_init() argument
209 struct smu_table_context *smu_table = &smu->smu_table; in vangogh_tables_init()
211 struct amdgpu_device *adev = smu->adev; in vangogh_tables_init()
215 ret = smu_cmn_get_smc_version(smu, &if_version, NULL); in vangogh_tables_init()
217 dev_err(adev->dev, "Failed to get smu if version!\n"); in vangogh_tables_init()
268 static int vangogh_get_legacy_smu_metrics_data(struct smu_context *smu, in vangogh_get_legacy_smu_metrics_data() argument
272 struct smu_table_context *smu_table = &smu->smu_table; in vangogh_get_legacy_smu_metrics_data()
276 mutex_lock(&smu->metrics_lock); in vangogh_get_legacy_smu_metrics_data()
278 ret = smu_cmn_get_metrics_table_locked(smu, in vangogh_get_legacy_smu_metrics_data()
282 mutex_unlock(&smu->metrics_lock); in vangogh_get_legacy_smu_metrics_data()
[all …]
Dsmu_v11_0.c82 int smu_v11_0_init_microcode(struct smu_context *smu) in smu_v11_0_init_microcode() argument
84 struct amdgpu_device *adev = smu->adev; in smu_v11_0_init_microcode()
159 void smu_v11_0_fini_microcode(struct smu_context *smu) in smu_v11_0_fini_microcode() argument
161 struct amdgpu_device *adev = smu->adev; in smu_v11_0_fini_microcode()
168 int smu_v11_0_load_microcode(struct smu_context *smu) in smu_v11_0_load_microcode() argument
170 struct amdgpu_device *adev = smu->adev; in smu_v11_0_load_microcode()
208 int smu_v11_0_check_fw_status(struct smu_context *smu) in smu_v11_0_check_fw_status() argument
210 struct amdgpu_device *adev = smu->adev; in smu_v11_0_check_fw_status()
223 int smu_v11_0_check_fw_version(struct smu_context *smu) in smu_v11_0_check_fw_version() argument
225 struct amdgpu_device *adev = smu->adev; in smu_v11_0_check_fw_version()
[all …]
Dsienna_cichlid_ppt.c77 if (smu->adev->asic_type == CHIP_BEIGE_GOBY)\
78 (*member) = (smu->smu_table.driver_pptable + offsetof(PPTable_beige_goby_t, field));\
80 (*member) = (smu->smu_table.driver_pptable + offsetof(PPTable_t, field));\
83 static int get_table_size(struct smu_context *smu) in get_table_size() argument
85 if (smu->adev->asic_type == CHIP_BEIGE_GOBY) in get_table_size()
264 sienna_cichlid_get_allowed_feature_mask(struct smu_context *smu, in sienna_cichlid_get_allowed_feature_mask() argument
267 struct amdgpu_device *adev = smu->adev; in sienna_cichlid_get_allowed_feature_mask()
328 if (smu->adev->pg_flags & AMD_PG_SUPPORT_ATHUB) in sienna_cichlid_get_allowed_feature_mask()
331 if (smu->adev->pg_flags & AMD_PG_SUPPORT_MMHUB) in sienna_cichlid_get_allowed_feature_mask()
334 if (smu->adev->pg_flags & AMD_PG_SUPPORT_VCN || in sienna_cichlid_get_allowed_feature_mask()
[all …]
Darcturus_ppt.c252 static int arcturus_tables_init(struct smu_context *smu) in arcturus_tables_init() argument
254 struct smu_table_context *smu_table = &smu->smu_table; in arcturus_tables_init()
288 static int arcturus_allocate_dpm_context(struct smu_context *smu) in arcturus_allocate_dpm_context() argument
290 struct smu_dpm_context *smu_dpm = &smu->smu_dpm; in arcturus_allocate_dpm_context()
311 static int arcturus_init_smc_tables(struct smu_context *smu) in arcturus_init_smc_tables() argument
315 ret = arcturus_tables_init(smu); in arcturus_init_smc_tables()
319 ret = arcturus_allocate_dpm_context(smu); in arcturus_init_smc_tables()
323 return smu_v11_0_init_smc_tables(smu); in arcturus_init_smc_tables()
327 arcturus_get_allowed_feature_mask(struct smu_context *smu, in arcturus_get_allowed_feature_mask() argument
339 static int arcturus_set_default_dpm_table(struct smu_context *smu) in arcturus_set_default_dpm_table() argument
[all …]
Dnavi10_ppt.c263 static bool is_asic_secure(struct smu_context *smu) in is_asic_secure() argument
265 struct amdgpu_device *adev = smu->adev; in is_asic_secure()
279 navi10_get_allowed_feature_mask(struct smu_context *smu, in navi10_get_allowed_feature_mask() argument
282 struct amdgpu_device *adev = smu->adev; in navi10_get_allowed_feature_mask()
328 if (smu->adev->pg_flags & AMD_PG_SUPPORT_MMHUB) in navi10_get_allowed_feature_mask()
331 if (smu->adev->pg_flags & AMD_PG_SUPPORT_ATHUB) in navi10_get_allowed_feature_mask()
334 if (smu->adev->pg_flags & AMD_PG_SUPPORT_VCN) in navi10_get_allowed_feature_mask()
337 if (smu->adev->pg_flags & AMD_PG_SUPPORT_JPEG) in navi10_get_allowed_feature_mask()
340 if (smu->dc_controlled_by_gpio) in navi10_get_allowed_feature_mask()
347 if (!(is_asic_secure(smu) && in navi10_get_allowed_feature_mask()
[all …]
Dcyan_skillfish_ppt.c86 static int cyan_skillfish_tables_init(struct smu_context *smu) in cyan_skillfish_tables_init() argument
88 struct smu_table_context *smu_table = &smu->smu_table; in cyan_skillfish_tables_init()
116 static int cyan_skillfish_init_smc_tables(struct smu_context *smu) in cyan_skillfish_init_smc_tables() argument
120 ret = cyan_skillfish_tables_init(smu); in cyan_skillfish_init_smc_tables()
124 return smu_v11_0_init_smc_tables(smu); in cyan_skillfish_init_smc_tables()
127 static int cyan_skillfish_finit_smc_tables(struct smu_context *smu) in cyan_skillfish_finit_smc_tables() argument
129 struct smu_table_context *smu_table = &smu->smu_table; in cyan_skillfish_finit_smc_tables()
144 cyan_skillfish_get_smu_metrics_data(struct smu_context *smu, in cyan_skillfish_get_smu_metrics_data() argument
148 struct smu_table_context *smu_table = &smu->smu_table; in cyan_skillfish_get_smu_metrics_data()
152 mutex_lock(&smu->metrics_lock); in cyan_skillfish_get_smu_metrics_data()
[all …]
/Linux-v5.15/drivers/gpu/drm/amd/pm/swsmu/smu12/
Dsmu_v12_0.c58 int smu_v12_0_check_fw_status(struct smu_context *smu) in smu_v12_0_check_fw_status() argument
60 struct amdgpu_device *adev = smu->adev; in smu_v12_0_check_fw_status()
73 int smu_v12_0_check_fw_version(struct smu_context *smu) in smu_v12_0_check_fw_version() argument
75 struct amdgpu_device *adev = smu->adev; in smu_v12_0_check_fw_version()
81 ret = smu_cmn_get_smc_version(smu, &if_version, &smu_version); in smu_v12_0_check_fw_version()
88 if (smu->is_apu) in smu_v12_0_check_fw_version()
99 if (if_version != smu->smc_driver_if_version) { in smu_v12_0_check_fw_version()
100 dev_info(smu->adev->dev, "smu driver if version = 0x%08x, smu fw if version = 0x%08x, " in smu_v12_0_check_fw_version()
101 "smu fw version = 0x%08x (%d.%d.%d)\n", in smu_v12_0_check_fw_version()
102 smu->smc_driver_if_version, if_version, in smu_v12_0_check_fw_version()
[all …]
Drenoir_ppt.c147 static int renoir_init_smc_tables(struct smu_context *smu) in renoir_init_smc_tables() argument
149 struct smu_table_context *smu_table = &smu->smu_table; in renoir_init_smc_tables()
193 static int renoir_get_dpm_clk_limited(struct smu_context *smu, enum smu_clk_type clk_type, in renoir_get_dpm_clk_limited() argument
196 DpmClocks_t *clk_table = smu->smu_table.clocks_table; in renoir_get_dpm_clk_limited()
241 static int renoir_get_profiling_clk_mask(struct smu_context *smu, in renoir_get_profiling_clk_mask() argument
271 static int renoir_get_dpm_ultimate_freq(struct smu_context *smu, in renoir_get_dpm_ultimate_freq() argument
280 if (!smu_cmn_clk_dpm_is_enabled(smu, clk_type)) { in renoir_get_dpm_ultimate_freq()
284 clock_limit = smu->smu_table.boot_values.uclk; in renoir_get_dpm_ultimate_freq()
288 clock_limit = smu->smu_table.boot_values.gfxclk; in renoir_get_dpm_ultimate_freq()
291 clock_limit = smu->smu_table.boot_values.socclk; in renoir_get_dpm_ultimate_freq()
[all …]
/Linux-v5.15/drivers/gpu/drm/amd/pm/inc/
Dsmu_v13_0.h126 int smu_v13_0_init_microcode(struct smu_context *smu);
128 void smu_v13_0_fini_microcode(struct smu_context *smu);
130 int smu_v13_0_load_microcode(struct smu_context *smu);
132 int smu_v13_0_init_smc_tables(struct smu_context *smu);
134 int smu_v13_0_fini_smc_tables(struct smu_context *smu);
136 int smu_v13_0_init_power(struct smu_context *smu);
138 int smu_v13_0_fini_power(struct smu_context *smu);
140 int smu_v13_0_check_fw_status(struct smu_context *smu);
142 int smu_v13_0_setup_pptable(struct smu_context *smu);
144 int smu_v13_0_get_vbios_bootup_values(struct smu_context *smu);
[all …]
Dsmu_v11_0.h160 int smu_v11_0_init_microcode(struct smu_context *smu);
162 void smu_v11_0_fini_microcode(struct smu_context *smu);
164 int smu_v11_0_load_microcode(struct smu_context *smu);
166 int smu_v11_0_init_smc_tables(struct smu_context *smu);
168 int smu_v11_0_fini_smc_tables(struct smu_context *smu);
170 int smu_v11_0_init_power(struct smu_context *smu);
172 int smu_v11_0_fini_power(struct smu_context *smu);
174 int smu_v11_0_check_fw_status(struct smu_context *smu);
176 int smu_v11_0_setup_pptable(struct smu_context *smu);
178 int smu_v11_0_get_vbios_bootup_values(struct smu_context *smu);
[all …]
Damdgpu_smu.h184 * Structure to hold a SMU Power State.
346 * uploading/downloading content from the SMU.
349 * SMU_MSG_TransferTableDram2Smu instructs SMU
567 * struct pptable_funcs - Callbacks used to interact with the SMU.
575 int (*run_btc)(struct smu_context *smu);
582 int (*get_allowed_feature_mask)(struct smu_context *smu, uint32_t *feature_mask, uint32_t num);
589 enum amd_pm_state_type (*get_current_power_state)(struct smu_context *smu);
593 * the SMU.
595 int (*set_default_dpm_table)(struct smu_context *smu);
597 int (*set_power_state)(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.15/drivers/macintosh/
Dsmu.c3 * PowerMac G5 SMU driver
15 * - maybe avoid some data copies with i2c by directly using the smu cmd
17 * - understand SMU -> CPU events and implement reception of them via
47 #include <asm/smu.h>
63 * This is the command buffer passed to the SMU hardware
95 * I don't think there will ever be more than one SMU, so
99 static struct smu_device *smu; variable
107 * SMU driver low level stuff
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()
[all …]
Dwindfarm_smu_controls.c3 * Windfarm PowerMac thermal control. SMU based controls
21 #include <asm/smu.h>
38 * SMU fans control object
46 u32 reg; /* index in SMU */
60 /* Fill SMU command structure */ in smu_set_fan()
63 /* The SMU has an "old" and a "new" way of setting the fan speed in smu_set_fan()
99 printk(KERN_WARNING "windfarm: SMU failed new fan command " in smu_set_fan()
131 *value = fct->value; /* todo: read from SMU */ in smu_fan_get()
175 /* We use the name & location here the same way we do for SMU sensors, in smu_fan_create()
258 struct device_node *smu, *fans, *fan; in smu_controls_init() local
[all …]
/Linux-v5.15/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/
Ddcn30_clk_mgr_smu_msg.c82 /* Set the parameter register for the SMU message */ in dcn30_smu_send_msg_with_param()
104 smu_print("SMU Test message: %d\n", input); in dcn30_smu_test_message()
116 smu_print("SMU Get SMU version\n"); in dcn30_smu_get_smu_version()
121 smu_print("SMU version: %d\n", *version); in dcn30_smu_get_smu_version()
134 smu_print("SMU Check driver if version\n"); in dcn30_smu_check_driver_if_version()
139 smu_print("SMU driver if version: %d\n", response); in dcn30_smu_check_driver_if_version()
153 smu_print("SMU Check msg header version\n"); in dcn30_smu_check_msg_header_version()
158 smu_print("SMU msg header version: %d\n", response); in dcn30_smu_check_msg_header_version()
169 smu_print("SMU Set DRAM addr high: %d\n", addr_high); in dcn30_smu_set_dram_addr_high()
177 smu_print("SMU Set DRAM addr low: %d\n", addr_low); in dcn30_smu_set_dram_addr_low()
[all …]
/Linux-v5.15/arch/powerpc/include/asm/
Dsmu.h6 * Definitions for talking to the SMU chip in newer G5 PowerMacs
14 * Known SMU commands
26 * the SMU. The length is always 2. First byte is the subcommand code
87 * The "RTC" part of the SMU controls the date, time, powerup
112 * the SMU. This is a command of type 0x9a with 9 bytes of header
115 * 0: bus number (from device-tree usually, SMU has lots of busses !)
137 * or if this is an SMU imposed limit. This driver has the same limitation
140 * Once that is completed, a response is expected from the SMU. This is
183 * used to set the voltage slewing point. The SMU replies with "DONE"
248 * frequency) depends on current time. Therefore, the SMU needs to know the
[all …]
/Linux-v5.15/Documentation/devicetree/bindings/clock/
Drenesas,emev2-smu.yaml4 $id: http://devicetree.org/schemas/clock/renesas,emev2-smu.yaml#
15 This is not a clock provider, but clocks under SMU depend on it.
19 const: renesas,emev2-smu
49 const: renesas,emev2-smu-clkdiv
54 Byte offset from SMU base and Bit position in the register.
81 const: renesas,emev2-smu-gclk
86 Byte offset from SMU base and Bit position in the register.
111 compatible = "renesas,emev2-smu";
129 compatible = "renesas,emev2-smu-clkdiv";
135 compatible = "renesas,emev2-smu-gclk";
/Linux-v5.15/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 …]

123456789