<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:11pt;color:#0078D7;margin:5pt;" align="Left">
[AMD Official Use Only - Internal Distribution Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Series is:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Evan Quan <evan.quan@amd.com><br>
<b>Sent:</b> Friday, March 19, 2021 2:53 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Quan, Evan <Evan.Quan@amd.com><br>
<b>Subject:</b> [PATCH 2/2] drm/amd/pm: label these APIs used internally as static</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Also drop unnecessary header file and declarations.<br>
<br>
Change-Id: I877b48c32c599534798e14e271c3e700b0d6ebf6<br>
Signed-off-by: Evan Quan <evan.quan@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 1 -<br>
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 1 -<br>
drivers/gpu/drm/amd/amdgpu/nv.c | 1 -<br>
drivers/gpu/drm/amd/amdgpu/soc15.c | 1 -<br>
drivers/gpu/drm/amd/pm/amdgpu_pm.c | 10 +-<br>
drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h | 61 +--------<br>
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 159 +++++++++++++---------<br>
7 files changed, 98 insertions(+), 136 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c<br>
index 33f748e5bbfc..1429c6897d3f 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c<br>
@@ -24,7 +24,6 @@<br>
#include <linux/list.h><br>
#include "amdgpu.h"<br>
#include "amdgpu_xgmi.h"<br>
-#include "amdgpu_smu.h"<br>
#include "amdgpu_ras.h"<br>
#include "soc15.h"<br>
#include "df/df_3_6_offset.h"<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c<br>
index d780b9c0926f..9a65ff871a58 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c<br>
@@ -29,7 +29,6 @@<br>
#include "amdgpu.h"<br>
#include "amdgpu_gfx.h"<br>
#include "amdgpu_psp.h"<br>
-#include "amdgpu_smu.h"<br>
#include "nv.h"<br>
#include "nvd.h"<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c<br>
index a31ef68ee2ab..e9cc3201054f 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/nv.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/nv.c<br>
@@ -34,7 +34,6 @@<br>
#include "amdgpu_vce.h"<br>
#include "amdgpu_ucode.h"<br>
#include "amdgpu_psp.h"<br>
-#include "amdgpu_smu.h"<br>
#include "atom.h"<br>
#include "amd_pcie.h"<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c<br>
index 3808402cd964..c354a11e2fd9 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/soc15.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/soc15.c<br>
@@ -76,7 +76,6 @@<br>
#include "smuio_v13_0.h"<br>
#include "dce_virtual.h"<br>
#include "mxgpu_ai.h"<br>
-#include "amdgpu_smu.h"<br>
#include "amdgpu_ras.h"<br>
#include "amdgpu_xgmi.h"<br>
#include <uapi/linux/kfd_ioctl.h><br>
diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c<br>
index 74fa5fe89970..10c761b11ff7 100644<br>
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c<br>
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c<br>
@@ -27,7 +27,6 @@<br>
#include "amdgpu_drv.h"<br>
#include "amdgpu_pm.h"<br>
#include "amdgpu_dpm.h"<br>
-#include "amdgpu_smu.h"<br>
#include "atom.h"<br>
#include <linux/pci.h><br>
#include <linux/hwmon.h><br>
@@ -930,14 +929,7 @@ static ssize_t amdgpu_set_pp_features(struct device *dev,<br>
return ret;<br>
}<br>
<br>
- if (is_support_sw_smu(adev)) {<br>
- ret = smu_sys_set_pp_feature_mask(&adev->smu, featuremask);<br>
- if (ret) {<br>
- pm_runtime_mark_last_busy(ddev->dev);<br>
- pm_runtime_put_autosuspend(ddev->dev);<br>
- return -EINVAL;<br>
- }<br>
- } else if (adev->powerplay.pp_funcs->set_ppfeature_status) {<br>
+ if (adev->powerplay.pp_funcs->set_ppfeature_status) {<br>
ret = amdgpu_dpm_set_ppfeature_status(adev, featuremask);<br>
if (ret) {<br>
pm_runtime_mark_last_busy(ddev->dev);<br>
diff --git a/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h b/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h<br>
index ca5a0a436cad..517f333fbc4b 100644<br>
--- a/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h<br>
+++ b/drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h<br>
@@ -1281,50 +1281,22 @@ int smu_load_microcode(struct smu_context *smu);<br>
<br>
int smu_check_fw_status(struct smu_context *smu);<br>
<br>
-int smu_set_gfx_cgpg(struct smu_context *smu, bool enabled);<br>
-<br>
-int smu_set_fan_speed_rpm(void *handle, uint32_t speed);<br>
-<br>
int smu_get_power_limit(struct smu_context *smu,<br>
uint32_t *limit,<br>
enum smu_ppt_limit_level limit_level);<br>
<br>
-int smu_set_power_limit(void *handle, uint32_t limit);<br>
-int smu_print_ppclk_levels(void *handle, enum pp_clock_type type, char *buf);<br>
-<br>
-int smu_od_edit_dpm_table(void *handle,<br>
- enum PP_OD_DPM_TABLE_COMMAND type,<br>
- long *input, uint32_t size);<br>
-<br>
-int smu_read_sensor(void *handle, int sensor, void *data, int *size);<br>
-int smu_get_power_profile_mode(void *handle, char *buf);<br>
-int smu_set_power_profile_mode(void *handle, long *param, uint32_t param_size);<br>
-u32 smu_get_fan_control_mode(void *handle);<br>
-int smu_set_fan_control_mode(struct smu_context *smu, int value);<br>
-void smu_pp_set_fan_control_mode(void *handle, u32 value);<br>
-int smu_get_fan_speed_percent(void *handle, u32 *speed);<br>
-int smu_set_fan_speed_percent(void *handle, u32 speed);<br>
-int smu_get_fan_speed_rpm(void *handle, uint32_t *speed);<br>
-<br>
-int smu_set_xgmi_pstate(void *handle,<br>
- uint32_t pstate);<br>
-<br>
int smu_set_azalia_d3_pme(struct smu_context *smu);<br>
<br>
bool smu_baco_is_support(struct smu_context *smu);<br>
-int smu_get_baco_capability(void *handle, bool *cap);<br>
<br>
int smu_baco_get_state(struct smu_context *smu, enum smu_baco_state *state);<br>
<br>
int smu_baco_enter(struct smu_context *smu);<br>
int smu_baco_exit(struct smu_context *smu);<br>
-int smu_baco_set_state(void *handle, int state);<br>
-<br>
<br>
bool smu_mode1_reset_is_support(struct smu_context *smu);<br>
bool smu_mode2_reset_is_support(struct smu_context *smu);<br>
int smu_mode1_reset(struct smu_context *smu);<br>
-int smu_mode2_reset(void *handle);<br>
<br>
extern const struct amd_ip_funcs smu_ip_funcs;<br>
<br>
@@ -1334,48 +1306,23 @@ extern const struct amdgpu_ip_block_version smu_v13_0_ip_block;<br>
<br>
bool is_support_sw_smu(struct amdgpu_device *adev);<br>
bool is_support_cclk_dpm(struct amdgpu_device *adev);<br>
-int smu_reset(struct smu_context *smu);<br>
-int smu_sys_get_pp_table(void *handle, char **table);<br>
-int smu_sys_set_pp_table(void *handle, const char *buf, size_t size);<br>
-int smu_get_power_num_states(void *handle, struct pp_states_info *state_info);<br>
-enum amd_pm_state_type smu_get_current_power_state(void *handle);<br>
int smu_write_watermarks_table(struct smu_context *smu);<br>
<br>
/* smu to display interface */<br>
extern int smu_dpm_set_power_gate(void *handle, uint32_t block_type, bool gate);<br>
-extern int smu_handle_task(struct smu_context *smu,<br>
- enum amd_dpm_forced_level level,<br>
- enum amd_pp_task task_id,<br>
- bool lock_needed);<br>
-extern int smu_handle_dpm_task(void *handle,<br>
- enum amd_pp_task task_id,<br>
- enum amd_pm_state_type *user_state);<br>
-int smu_switch_power_profile(void *handle,<br>
- enum PP_SMC_POWER_PROFILE type,<br>
- bool en);<br>
+<br>
int smu_get_dpm_freq_range(struct smu_context *smu, enum smu_clk_type clk_type,<br>
uint32_t *min, uint32_t *max);<br>
-u32 smu_get_mclk(void *handle, bool low);<br>
-u32 smu_get_sclk(void *handle, bool low);<br>
+<br>
int smu_set_soft_freq_range(struct smu_context *smu, enum smu_clk_type clk_type,<br>
uint32_t min, uint32_t max);<br>
-enum amd_dpm_forced_level smu_get_performance_level(void *handle);<br>
-int smu_force_performance_level(void *handle, enum amd_dpm_forced_level level);<br>
+<br>
int smu_set_ac_dc(struct smu_context *smu);<br>
-int smu_sys_get_pp_feature_mask(void *handle, char *buf);<br>
-int smu_sys_set_pp_feature_mask(void *handle, uint64_t new_mask);<br>
-int smu_force_ppclk_levels(void *handle, enum pp_clock_type type, uint32_t mask);<br>
-int smu_set_mp1_state(void *handle,<br>
- enum pp_mp1_state mp1_state);<br>
-int smu_set_df_cstate(void *handle,<br>
- enum pp_df_cstate state);<br>
+<br>
int smu_allow_xgmi_power_down(struct smu_context *smu, bool en);<br>
<br>
int smu_get_status_gfxoff(struct amdgpu_device *adev, uint32_t *value);<br>
<br>
-ssize_t smu_sys_get_gpu_metrics(void *handle, void **table);<br>
-<br>
-int smu_enable_mgpu_fan_boost(void *handle);<br>
int smu_gfx_state_change_set(struct smu_context *smu, uint32_t state);<br>
<br>
int smu_set_light_sbr(struct smu_context *smu, bool enable);<br>
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c<br>
index db56cb3693a3..35aa1d234535 100644<br>
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c<br>
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c<br>
@@ -51,8 +51,19 @@ static const struct amd_pm_funcs swsmu_pm_funcs;<br>
static int smu_force_smuclk_levels(struct smu_context *smu,<br>
enum smu_clk_type clk_type,<br>
uint32_t mask);<br>
-<br>
-int smu_sys_get_pp_feature_mask(void *handle, char *buf)<br>
+static int smu_handle_task(struct smu_context *smu,<br>
+ enum amd_dpm_forced_level level,<br>
+ enum amd_pp_task task_id,<br>
+ bool lock_needed);<br>
+static int smu_reset(struct smu_context *smu);<br>
+static int smu_set_fan_speed_percent(void *handle, u32 speed);<br>
+static int smu_set_fan_control_mode(struct smu_context *smu, int value);<br>
+static int smu_set_power_limit(void *handle, uint32_t limit);<br>
+static int smu_set_fan_speed_rpm(void *handle, uint32_t speed);<br>
+static int smu_set_gfx_cgpg(struct smu_context *smu, bool enabled);<br>
+<br>
+static int smu_sys_get_pp_feature_mask(void *handle,<br>
+ char *buf)<br>
{<br>
struct smu_context *smu = handle;<br>
int size = 0;<br>
@@ -69,7 +80,8 @@ int smu_sys_get_pp_feature_mask(void *handle, char *buf)<br>
return size;<br>
}<br>
<br>
-int smu_sys_set_pp_feature_mask(void *handle, uint64_t new_mask)<br>
+static int smu_sys_set_pp_feature_mask(void *handle,<br>
+ uint64_t new_mask)<br>
{<br>
struct smu_context *smu = handle;<br>
int ret = 0;<br>
@@ -142,7 +154,7 @@ int smu_get_dpm_freq_range(struct smu_context *smu,<br>
return ret;<br>
}<br>
<br>
-u32 smu_get_mclk(void *handle, bool low)<br>
+static u32 smu_get_mclk(void *handle, bool low)<br>
{<br>
struct smu_context *smu = handle;<br>
uint32_t clk_freq;<br>
@@ -156,7 +168,7 @@ u32 smu_get_mclk(void *handle, bool low)<br>
return clk_freq * 100;<br>
}<br>
<br>
-u32 smu_get_sclk(void *handle, bool low)<br>
+static u32 smu_get_sclk(void *handle, bool low)<br>
{<br>
struct smu_context *smu = handle;<br>
uint32_t clk_freq;<br>
@@ -256,7 +268,8 @@ static int smu_dpm_set_jpeg_enable(struct smu_context *smu,<br>
* Under this case, the smu->mutex lock protection is already enforced on<br>
* the parent API smu_force_performance_level of the call path.<br>
*/<br>
-int smu_dpm_set_power_gate(void *handle, uint32_t block_type,<br>
+int smu_dpm_set_power_gate(void *handle,<br>
+ uint32_t block_type,<br>
bool gate)<br>
{<br>
struct smu_context *smu = handle;<br>
@@ -412,8 +425,8 @@ static void smu_restore_dpm_user_profile(struct smu_context *smu)<br>
smu->user_dpm_profile.flags &= ~SMU_DPM_USER_PROFILE_RESTORE;<br>
}<br>
<br>
-int smu_get_power_num_states(void *handle,<br>
- struct pp_states_info *state_info)<br>
+static int smu_get_power_num_states(void *handle,<br>
+ struct pp_states_info *state_info)<br>
{<br>
if (!state_info)<br>
return -EINVAL;<br>
@@ -448,7 +461,8 @@ bool is_support_cclk_dpm(struct amdgpu_device *adev)<br>
}<br>
<br>
<br>
-int smu_sys_get_pp_table(void *handle, char **table)<br>
+static int smu_sys_get_pp_table(void *handle,<br>
+ char **table)<br>
{<br>
struct smu_context *smu = handle;<br>
struct smu_table_context *smu_table = &smu->smu_table;<br>
@@ -474,7 +488,9 @@ int smu_sys_get_pp_table(void *handle, char **table)<br>
return powerplay_table_size;<br>
}<br>
<br>
-int smu_sys_set_pp_table(void *handle, const char *buf, size_t size)<br>
+static int smu_sys_set_pp_table(void *handle,<br>
+ const char *buf,<br>
+ size_t size)<br>
{<br>
struct smu_context *smu = handle;<br>
struct smu_table_context *smu_table = &smu->smu_table;<br>
@@ -638,6 +654,7 @@ static int smu_set_default_dpm_table(struct smu_context *smu)<br>
return ret;<br>
}<br>
<br>
+<br>
static int smu_late_init(void *handle)<br>
{<br>
struct amdgpu_device *adev = (struct amdgpu_device *)handle;<br>
@@ -1538,8 +1555,8 @@ static int smu_resume(void *handle)<br>
return 0;<br>
}<br>
<br>
-int smu_display_configuration_change(void *handle,<br>
- const struct amd_pp_display_configuration *display_config)<br>
+static int smu_display_configuration_change(void *handle,<br>
+ const struct amd_pp_display_configuration *display_config)<br>
{<br>
struct smu_context *smu = handle;<br>
int index = 0;<br>
@@ -1732,9 +1749,9 @@ int smu_handle_task(struct smu_context *smu,<br>
return ret;<br>
}<br>
<br>
-int smu_handle_dpm_task(void *handle,<br>
- enum amd_pp_task task_id,<br>
- enum amd_pm_state_type *user_state)<br>
+static int smu_handle_dpm_task(void *handle,<br>
+ enum amd_pp_task task_id,<br>
+ enum amd_pm_state_type *user_state)<br>
{<br>
struct smu_context *smu = handle;<br>
struct smu_dpm_context *smu_dpm = &smu->smu_dpm;<br>
@@ -1743,10 +1760,9 @@ int smu_handle_dpm_task(void *handle,<br>
<br>
}<br>
<br>
-<br>
-int smu_switch_power_profile(void *handle,<br>
- enum PP_SMC_POWER_PROFILE type,<br>
- bool en)<br>
+static int smu_switch_power_profile(void *handle,<br>
+ enum PP_SMC_POWER_PROFILE type,<br>
+ bool en)<br>
{<br>
struct smu_context *smu = handle;<br>
struct smu_dpm_context *smu_dpm_ctx = &(smu->smu_dpm);<br>
@@ -1782,7 +1798,7 @@ int smu_switch_power_profile(void *handle,<br>
return 0;<br>
}<br>
<br>
-enum amd_dpm_forced_level smu_get_performance_level(void *handle)<br>
+static enum amd_dpm_forced_level smu_get_performance_level(void *handle)<br>
{<br>
struct smu_context *smu = handle;<br>
struct smu_dpm_context *smu_dpm_ctx = &(smu->smu_dpm);<br>
@@ -1801,7 +1817,8 @@ enum amd_dpm_forced_level smu_get_performance_level(void *handle)<br>
return level;<br>
}<br>
<br>
-int smu_force_performance_level(void *handle, enum amd_dpm_forced_level level)<br>
+static int smu_force_performance_level(void *handle,<br>
+ enum amd_dpm_forced_level level)<br>
{<br>
struct smu_context *smu = handle;<br>
struct smu_dpm_context *smu_dpm_ctx = &(smu->smu_dpm);<br>
@@ -1836,7 +1853,7 @@ int smu_force_performance_level(void *handle, enum amd_dpm_forced_level level)<br>
return ret;<br>
}<br>
<br>
-int smu_set_display_count(void *handle, uint32_t count)<br>
+static int smu_set_display_count(void *handle, uint32_t count)<br>
{<br>
struct smu_context *smu = handle;<br>
int ret = 0;<br>
@@ -1881,7 +1898,9 @@ static int smu_force_smuclk_levels(struct smu_context *smu,<br>
return ret;<br>
}<br>
<br>
-int smu_force_ppclk_levels(void *handle, enum pp_clock_type type, uint32_t mask)<br>
+static int smu_force_ppclk_levels(void *handle,<br>
+ enum pp_clock_type type,<br>
+ uint32_t mask)<br>
{<br>
struct smu_context *smu = handle;<br>
enum smu_clk_type clk_type;<br>
@@ -1925,8 +1944,8 @@ int smu_force_ppclk_levels(void *handle, enum pp_clock_type type, uint32_t mask)<br>
* However, the mp1 state setting should still be granted<br>
* even if the dpm_enabled cleared.<br>
*/<br>
-int smu_set_mp1_state(void *handle,<br>
- enum pp_mp1_state mp1_state)<br>
+static int smu_set_mp1_state(void *handle,<br>
+ enum pp_mp1_state mp1_state)<br>
{<br>
struct smu_context *smu = handle;<br>
int ret = 0;<br>
@@ -1945,8 +1964,8 @@ int smu_set_mp1_state(void *handle,<br>
return ret;<br>
}<br>
<br>
-int smu_set_df_cstate(void *handle,<br>
- enum pp_df_cstate state)<br>
+static int smu_set_df_cstate(void *handle,<br>
+ enum pp_df_cstate state)<br>
{<br>
struct smu_context *smu = handle;<br>
int ret = 0;<br>
@@ -2005,8 +2024,8 @@ int smu_write_watermarks_table(struct smu_context *smu)<br>
return ret;<br>
}<br>
<br>
-int smu_set_watermarks_for_clock_ranges(void *handle,<br>
- struct pp_smu_wm_range_sets *clock_ranges)<br>
+static int smu_set_watermarks_for_clock_ranges(void *handle,<br>
+ struct pp_smu_wm_range_sets *clock_ranges)<br>
{<br>
struct smu_context *smu = handle;<br>
int ret = 0;<br>
@@ -2143,7 +2162,7 @@ int smu_set_gfx_cgpg(struct smu_context *smu, bool enabled)<br>
return ret;<br>
}<br>
<br>
-int smu_set_fan_speed_rpm(void *handle, uint32_t speed)<br>
+static int smu_set_fan_speed_rpm(void *handle, uint32_t speed)<br>
{<br>
struct smu_context *smu = handle;<br>
int ret = 0;<br>
@@ -2202,7 +2221,7 @@ int smu_get_power_limit(struct smu_context *smu,<br>
return ret;<br>
}<br>
<br>
-int smu_set_power_limit(void *handle, uint32_t limit)<br>
+static int smu_set_power_limit(void *handle, uint32_t limit)<br>
{<br>
struct smu_context *smu = handle;<br>
uint32_t limit_type = limit >> 24;<br>
@@ -2258,7 +2277,9 @@ static int smu_print_smuclk_levels(struct smu_context *smu, enum smu_clk_type cl<br>
return ret;<br>
}<br>
<br>
-int smu_print_ppclk_levels(void *handle, enum pp_clock_type type, char *buf)<br>
+static int smu_print_ppclk_levels(void *handle,<br>
+ enum pp_clock_type type,<br>
+ char *buf)<br>
{<br>
struct smu_context *smu = handle;<br>
enum smu_clk_type clk_type;<br>
@@ -2299,9 +2320,9 @@ int smu_print_ppclk_levels(void *handle, enum pp_clock_type type, char *buf)<br>
return smu_print_smuclk_levels(smu, clk_type, buf);<br>
}<br>
<br>
-int smu_od_edit_dpm_table(void *handle,<br>
- enum PP_OD_DPM_TABLE_COMMAND type,<br>
- long *input, uint32_t size)<br>
+static int smu_od_edit_dpm_table(void *handle,<br>
+ enum PP_OD_DPM_TABLE_COMMAND type,<br>
+ long *input, uint32_t size)<br>
{<br>
struct smu_context *smu = handle;<br>
int ret = 0;<br>
@@ -2320,7 +2341,10 @@ int smu_od_edit_dpm_table(void *handle,<br>
return ret;<br>
}<br>
<br>
-int smu_read_sensor(void *handle, int sensor, void *data, int *size_arg)<br>
+static int smu_read_sensor(void *handle,<br>
+ int sensor,<br>
+ void *data,<br>
+ int *size_arg)<br>
{<br>
struct smu_context *smu = handle;<br>
struct smu_umd_pstate_table *pstate_table =<br>
@@ -2387,7 +2411,7 @@ int smu_read_sensor(void *handle, int sensor, void *data, int *size_arg)<br>
return ret;<br>
}<br>
<br>
-int smu_get_power_profile_mode(void *handle, char *buf)<br>
+static int smu_get_power_profile_mode(void *handle, char *buf)<br>
{<br>
struct smu_context *smu = handle;<br>
int ret = 0;<br>
@@ -2405,7 +2429,9 @@ int smu_get_power_profile_mode(void *handle, char *buf)<br>
return ret;<br>
}<br>
<br>
-int smu_set_power_profile_mode(void *handle, long *param, uint32_t param_size)<br>
+static int smu_set_power_profile_mode(void *handle,<br>
+ long *param,<br>
+ uint32_t param_size)<br>
{<br>
struct smu_context *smu = handle;<br>
int ret = 0;<br>
@@ -2423,7 +2449,7 @@ int smu_set_power_profile_mode(void *handle, long *param, uint32_t param_size)<br>
}<br>
<br>
<br>
-u32 smu_get_fan_control_mode(void *handle)<br>
+static u32 smu_get_fan_control_mode(void *handle)<br>
{<br>
struct smu_context *smu = handle;<br>
u32 ret = 0;<br>
@@ -2469,14 +2495,15 @@ int smu_set_fan_control_mode(struct smu_context *smu, int value)<br>
return ret;<br>
}<br>
<br>
-void smu_pp_set_fan_control_mode(void *handle, u32 value) {<br>
+static void smu_pp_set_fan_control_mode(void *handle, u32 value)<br>
+{<br>
struct smu_context *smu = handle;<br>
<br>
smu_set_fan_control_mode(smu, value);<br>
}<br>
<br>
<br>
-int smu_get_fan_speed_percent(void *handle, u32 *speed)<br>
+static int smu_get_fan_speed_percent(void *handle, u32 *speed)<br>
{<br>
struct smu_context *smu = handle;<br>
int ret = 0;<br>
@@ -2494,7 +2521,7 @@ int smu_get_fan_speed_percent(void *handle, u32 *speed)<br>
return ret;<br>
}<br>
<br>
-int smu_set_fan_speed_percent(void *handle, u32 speed)<br>
+static int smu_set_fan_speed_percent(void *handle, u32 speed)<br>
{<br>
struct smu_context *smu = handle;<br>
int ret = 0;<br>
@@ -2517,7 +2544,7 @@ int smu_set_fan_speed_percent(void *handle, u32 speed)<br>
return ret;<br>
}<br>
<br>
-int smu_get_fan_speed_rpm(void *handle, uint32_t *speed)<br>
+static int smu_get_fan_speed_rpm(void *handle, uint32_t *speed)<br>
{<br>
struct smu_context *smu = handle;<br>
int ret = 0;<br>
@@ -2535,7 +2562,7 @@ int smu_get_fan_speed_rpm(void *handle, uint32_t *speed)<br>
return ret;<br>
}<br>
<br>
-int smu_set_deep_sleep_dcefclk(void *handle, uint32_t clk)<br>
+static int smu_set_deep_sleep_dcefclk(void *handle, uint32_t clk)<br>
{<br>
struct smu_context *smu = handle;<br>
int ret = 0;<br>
@@ -2552,9 +2579,9 @@ int smu_set_deep_sleep_dcefclk(void *handle, uint32_t clk)<br>
return ret;<br>
}<br>
<br>
-int smu_get_clock_by_type_with_latency(void *handle,<br>
- enum amd_pp_clock_type type,<br>
- struct pp_clock_levels_with_latency *clocks)<br>
+static int smu_get_clock_by_type_with_latency(void *handle,<br>
+ enum amd_pp_clock_type type,<br>
+ struct pp_clock_levels_with_latency *clocks)<br>
{<br>
struct smu_context *smu = handle;<br>
enum smu_clk_type clk_type;<br>
@@ -2593,8 +2620,8 @@ int smu_get_clock_by_type_with_latency(void *handle,<br>
return ret;<br>
}<br>
<br>
-int smu_display_clock_voltage_request(void *handle,<br>
- struct pp_display_clock_request *clock_req)<br>
+static int smu_display_clock_voltage_request(void *handle,<br>
+ struct pp_display_clock_request *clock_req)<br>
{<br>
struct smu_context *smu = handle;<br>
int ret = 0;<br>
@@ -2613,8 +2640,8 @@ int smu_display_clock_voltage_request(void *handle,<br>
}<br>
<br>
<br>
-int smu_display_disable_memory_clock_switch(void *handle,<br>
- bool disable_memory_clock_switch)<br>
+static int smu_display_disable_memory_clock_switch(void *handle,<br>
+ bool disable_memory_clock_switch)<br>
{<br>
struct smu_context *smu = handle;<br>
int ret = -EINVAL;<br>
@@ -2632,8 +2659,8 @@ int smu_display_disable_memory_clock_switch(void *handle,<br>
return ret;<br>
}<br>
<br>
-int smu_set_xgmi_pstate(void *handle,<br>
- uint32_t pstate)<br>
+static int smu_set_xgmi_pstate(void *handle,<br>
+ uint32_t pstate)<br>
{<br>
struct smu_context *smu = handle;<br>
int ret = 0;<br>
@@ -2696,7 +2723,7 @@ bool smu_baco_is_support(struct smu_context *smu)<br>
return ret;<br>
}<br>
<br>
-int smu_get_baco_capability(void *handle, bool *cap)<br>
+static int smu_get_baco_capability(void *handle, bool *cap)<br>
{<br>
struct smu_context *smu = handle;<br>
int ret = 0;<br>
@@ -2769,7 +2796,7 @@ int smu_baco_exit(struct smu_context *smu)<br>
return ret;<br>
}<br>
<br>
-int smu_baco_set_state(void *handle, int state)<br>
+static int smu_baco_set_state(void *handle, int state)<br>
{<br>
struct smu_context *smu = handle;<br>
int ret = 0;<br>
@@ -2854,7 +2881,7 @@ int smu_mode1_reset(struct smu_context *smu)<br>
return ret;<br>
}<br>
<br>
-int smu_mode2_reset(void *handle)<br>
+static int smu_mode2_reset(void *handle)<br>
{<br>
struct smu_context *smu = handle;<br>
int ret = 0;<br>
@@ -2875,8 +2902,8 @@ int smu_mode2_reset(void *handle)<br>
return ret;<br>
}<br>
<br>
-int smu_get_max_sustainable_clocks_by_dc(void *handle,<br>
- struct pp_smu_nv_clock_table *max_clocks)<br>
+static int smu_get_max_sustainable_clocks_by_dc(void *handle,<br>
+ struct pp_smu_nv_clock_table *max_clocks)<br>
{<br>
struct smu_context *smu = handle;<br>
int ret = 0;<br>
@@ -2894,9 +2921,9 @@ int smu_get_max_sustainable_clocks_by_dc(void *handle,<br>
return ret;<br>
}<br>
<br>
-int smu_get_uclk_dpm_states(void *handle,<br>
- unsigned int *clock_values_in_khz,<br>
- unsigned int *num_states)<br>
+static int smu_get_uclk_dpm_states(void *handle,<br>
+ unsigned int *clock_values_in_khz,<br>
+ unsigned int *num_states)<br>
{<br>
struct smu_context *smu = handle;<br>
int ret = 0;<br>
@@ -2914,7 +2941,7 @@ int smu_get_uclk_dpm_states(void *handle,<br>
return ret;<br>
}<br>
<br>
-enum amd_pm_state_type smu_get_current_power_state(void *handle)<br>
+static enum amd_pm_state_type smu_get_current_power_state(void *handle)<br>
{<br>
struct smu_context *smu = handle;<br>
enum amd_pm_state_type pm_state = POWER_STATE_TYPE_DEFAULT;<br>
@@ -2932,8 +2959,8 @@ enum amd_pm_state_type smu_get_current_power_state(void *handle)<br>
return pm_state;<br>
}<br>
<br>
-int smu_get_dpm_clock_table(void *handle,<br>
- struct dpm_clocks *clock_table)<br>
+static int smu_get_dpm_clock_table(void *handle,<br>
+ struct dpm_clocks *clock_table)<br>
{<br>
struct smu_context *smu = handle;<br>
int ret = 0;<br>
@@ -2951,7 +2978,7 @@ int smu_get_dpm_clock_table(void *handle,<br>
return ret;<br>
}<br>
<br>
-ssize_t smu_sys_get_gpu_metrics(void *handle, void **table)<br>
+static ssize_t smu_sys_get_gpu_metrics(void *handle, void **table)<br>
{<br>
struct smu_context *smu = handle;<br>
ssize_t size;<br>
@@ -2971,7 +2998,7 @@ ssize_t smu_sys_get_gpu_metrics(void *handle, void **table)<br>
return size;<br>
}<br>
<br>
-int smu_enable_mgpu_fan_boost(void *handle)<br>
+static int smu_enable_mgpu_fan_boost(void *handle)<br>
{<br>
struct smu_context *smu = handle;<br>
int ret = 0;<br>
-- <br>
2.29.0<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Calexander.deucher%40amd.com%7C14fbcd618ad346544e6208d8eaa3e199%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637517336878050566%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=27i1t6T9kwjKHp5gfPdmiCBcFeGVbPGqkLBoCBo3T1Q%3D&reserved=0">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Calexander.deucher%40amd.com%7C14fbcd618ad346544e6208d8eaa3e199%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637517336878050566%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=27i1t6T9kwjKHp5gfPdmiCBcFeGVbPGqkLBoCBo3T1Q%3D&reserved=0</a><br>
</div>
</span></font></div>
</div>
</body>
</html>