Commit 41698abb authored by Rex Zhu's avatar Rex Zhu Committed by Alex Deucher

drm/amd/powerplay: delete duplicated function and definition.

Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Acked-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarRex Zhu <Rex.Zhu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 00d57e6d
...@@ -35,8 +35,6 @@ ...@@ -35,8 +35,6 @@
#include "pp_acpi.h" #include "pp_acpi.h"
#include "amd_acpi.h" #include "amd_acpi.h"
#define VOLTAGE_SCALE 4
extern int cz_hwmgr_init(struct pp_hwmgr *hwmgr); extern int cz_hwmgr_init(struct pp_hwmgr *hwmgr);
extern int tonga_hwmgr_init(struct pp_hwmgr *hwmgr); extern int tonga_hwmgr_init(struct pp_hwmgr *hwmgr);
extern int fiji_hwmgr_init(struct pp_hwmgr *hwmgr); extern int fiji_hwmgr_init(struct pp_hwmgr *hwmgr);
...@@ -46,6 +44,11 @@ extern int iceland_hwmgr_init(struct pp_hwmgr *hwmgr); ...@@ -46,6 +44,11 @@ extern int iceland_hwmgr_init(struct pp_hwmgr *hwmgr);
static void hwmgr_init_default_caps(struct pp_hwmgr *hwmgr); static void hwmgr_init_default_caps(struct pp_hwmgr *hwmgr);
static int hwmgr_set_user_specify_caps(struct pp_hwmgr *hwmgr); static int hwmgr_set_user_specify_caps(struct pp_hwmgr *hwmgr);
uint8_t convert_to_vid(uint16_t vddc)
{
return (uint8_t) ((6200 - (vddc * VOLTAGE_SCALE)) / 25);
}
int hwmgr_init(struct amd_pp_init *pp_init, struct pp_instance *handle) int hwmgr_init(struct amd_pp_init *pp_init, struct pp_instance *handle)
{ {
struct pp_hwmgr *hwmgr; struct pp_hwmgr *hwmgr;
......
...@@ -1355,14 +1355,6 @@ static int iceland_populate_smc_mvdd_table(struct pp_hwmgr *hwmgr, ...@@ -1355,14 +1355,6 @@ static int iceland_populate_smc_mvdd_table(struct pp_hwmgr *hwmgr,
return 0; return 0;
} }
/**
* Convert a voltage value in mv unit to VID number required by SMU firmware
*/
static uint8_t convert_to_vid(uint16_t vddc)
{
return (uint8_t) ((6200 - (vddc * VOLTAGE_SCALE)) / 25);
}
int iceland_populate_bapm_vddc_vid_sidd(struct pp_hwmgr *hwmgr) int iceland_populate_bapm_vddc_vid_sidd(struct pp_hwmgr *hwmgr)
{ {
int i; int i;
......
...@@ -736,11 +736,6 @@ int polaris10_setup_default_dpm_tables(struct pp_hwmgr *hwmgr) ...@@ -736,11 +736,6 @@ int polaris10_setup_default_dpm_tables(struct pp_hwmgr *hwmgr)
return 0; return 0;
} }
uint8_t convert_to_vid(uint16_t vddc)
{
return (uint8_t) ((6200 - (vddc * VOLTAGE_SCALE)) / 25);
}
/** /**
* Mvdd table preparation for SMC. * Mvdd table preparation for SMC.
* *
......
...@@ -1316,15 +1316,6 @@ static int tonga_populate_smc_mvdd_table(struct pp_hwmgr *hwmgr, ...@@ -1316,15 +1316,6 @@ static int tonga_populate_smc_mvdd_table(struct pp_hwmgr *hwmgr,
return 0; return 0;
} }
/**
* Convert a voltage value in mv unit to VID number required by SMU firmware
*/
static uint8_t convert_to_vid(uint16_t vddc)
{
return (uint8_t) ((6200 - (vddc * VOLTAGE_SCALE)) / 25);
}
/** /**
* Preparation of vddc and vddgfx CAC tables for SMC. * Preparation of vddc and vddgfx CAC tables for SMC.
* *
......
...@@ -42,6 +42,10 @@ extern int amdgpu_powercontainment; ...@@ -42,6 +42,10 @@ extern int amdgpu_powercontainment;
extern int amdgpu_sclk_deep_sleep_en; extern int amdgpu_sclk_deep_sleep_en;
extern unsigned amdgpu_pp_feature_mask; extern unsigned amdgpu_pp_feature_mask;
#define VOLTAGE_SCALE 4
uint8_t convert_to_vid(uint16_t vddc);
enum DISPLAY_GAP { enum DISPLAY_GAP {
DISPLAY_GAP_VBLANK_OR_WM = 0, /* Wait for vblank or MCHG watermark. */ DISPLAY_GAP_VBLANK_OR_WM = 0, /* Wait for vblank or MCHG watermark. */
DISPLAY_GAP_VBLANK = 1, /* Wait for vblank. */ DISPLAY_GAP_VBLANK = 1, /* Wait for vblank. */
......
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
#include "cgs_common.h" #include "cgs_common.h"
#define POLARIS10_SMC_SIZE 0x20000 #define POLARIS10_SMC_SIZE 0x20000
#define VOLTAGE_SCALE 4
/* Microcode file is stored in this buffer */ /* Microcode file is stored in this buffer */
#define BUFFER_SIZE 80000 #define BUFFER_SIZE 80000
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "cgs_common.h" #include "cgs_common.h"
#include "linux/delay.h" #include "linux/delay.h"
int smum_init(struct amd_pp_init *pp_init, struct pp_instance *handle) int smum_init(struct amd_pp_init *pp_init, struct pp_instance *handle)
{ {
struct pp_smumgr *smumgr; struct pp_smumgr *smumgr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment