Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Rex Zhu and committed by
Alex Deucher
41698abb 00d57e6d

+10 -25
+5 -2
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
··· 35 35 #include "pp_acpi.h" 36 36 #include "amd_acpi.h" 37 37 38 - #define VOLTAGE_SCALE 4 39 - 40 38 extern int cz_hwmgr_init(struct pp_hwmgr *hwmgr); 41 39 extern int tonga_hwmgr_init(struct pp_hwmgr *hwmgr); 42 40 extern int fiji_hwmgr_init(struct pp_hwmgr *hwmgr); ··· 43 45 44 46 static void hwmgr_init_default_caps(struct pp_hwmgr *hwmgr); 45 47 static int hwmgr_set_user_specify_caps(struct pp_hwmgr *hwmgr); 48 + 49 + uint8_t convert_to_vid(uint16_t vddc) 50 + { 51 + return (uint8_t) ((6200 - (vddc * VOLTAGE_SCALE)) / 25); 52 + } 46 53 47 54 int hwmgr_init(struct amd_pp_init *pp_init, struct pp_instance *handle) 48 55 {
-8
drivers/gpu/drm/amd/powerplay/hwmgr/iceland_hwmgr.c
··· 1355 1355 return 0; 1356 1356 } 1357 1357 1358 - /** 1359 - * Convert a voltage value in mv unit to VID number required by SMU firmware 1360 - */ 1361 - static uint8_t convert_to_vid(uint16_t vddc) 1362 - { 1363 - return (uint8_t) ((6200 - (vddc * VOLTAGE_SCALE)) / 25); 1364 - } 1365 - 1366 1358 int iceland_populate_bapm_vddc_vid_sidd(struct pp_hwmgr *hwmgr) 1367 1359 { 1368 1360 int i;
-5
drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c
··· 736 736 return 0; 737 737 } 738 738 739 - uint8_t convert_to_vid(uint16_t vddc) 740 - { 741 - return (uint8_t) ((6200 - (vddc * VOLTAGE_SCALE)) / 25); 742 - } 743 - 744 739 /** 745 740 * Mvdd table preparation for SMC. 746 741 *
-9
drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c
··· 1317 1317 } 1318 1318 1319 1319 /** 1320 - * Convert a voltage value in mv unit to VID number required by SMU firmware 1321 - */ 1322 - static uint8_t convert_to_vid(uint16_t vddc) 1323 - { 1324 - return (uint8_t) ((6200 - (vddc * VOLTAGE_SCALE)) / 25); 1325 - } 1326 - 1327 - 1328 - /** 1329 1320 * Preparation of vddc and vddgfx CAC tables for SMC. 1330 1321 * 1331 1322 * @param hwmgr the address of the hardware manager
+4
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
··· 42 42 extern int amdgpu_sclk_deep_sleep_en; 43 43 extern unsigned amdgpu_pp_feature_mask; 44 44 45 + #define VOLTAGE_SCALE 4 46 + 47 + uint8_t convert_to_vid(uint16_t vddc); 48 + 45 49 enum DISPLAY_GAP { 46 50 DISPLAY_GAP_VBLANK_OR_WM = 0, /* Wait for vblank or MCHG watermark. */ 47 51 DISPLAY_GAP_VBLANK = 1, /* Wait for vblank. */
-1
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c
··· 40 40 #include "cgs_common.h" 41 41 42 42 #define POLARIS10_SMC_SIZE 0x20000 43 - #define VOLTAGE_SCALE 4 44 43 45 44 /* Microcode file is stored in this buffer */ 46 45 #define BUFFER_SIZE 80000
+1
drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c
··· 29 29 #include "cgs_common.h" 30 30 #include "linux/delay.h" 31 31 32 + 32 33 int smum_init(struct amd_pp_init *pp_init, struct pp_instance *handle) 33 34 { 34 35 struct pp_smumgr *smumgr;