diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2018-04-09 22:58:43 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-05-15 14:43:07 -0400 |
commit | 45313e5f1c72962a21df58af52a421e4c076b2d4 (patch) | |
tree | bf5a96e2a088fb99988a2891cc751c17c9c1f728 | |
parent | d6014e776ceb5da2d86ce405f692522f2b0370f2 (diff) |
drm/amd/pp: Move same macro definitions to hwmgr.h
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
10 files changed, 2 insertions, 27 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c index 14332159227e..21c021ba0f49 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | |||
@@ -61,10 +61,6 @@ | |||
61 | #define SMC_CG_IND_START 0xc0030000 | 61 | #define SMC_CG_IND_START 0xc0030000 |
62 | #define SMC_CG_IND_END 0xc0040000 | 62 | #define SMC_CG_IND_END 0xc0040000 |
63 | 63 | ||
64 | #define VOLTAGE_SCALE 4 | ||
65 | #define VOLTAGE_VID_OFFSET_SCALE1 625 | ||
66 | #define VOLTAGE_VID_OFFSET_SCALE2 100 | ||
67 | |||
68 | #define MEM_FREQ_LOW_LATENCY 25000 | 64 | #define MEM_FREQ_LOW_LATENCY 25000 |
69 | #define MEM_FREQ_HIGH_LATENCY 80000 | 65 | #define MEM_FREQ_HIGH_LATENCY 80000 |
70 | 66 | ||
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c index c90502bcc2b2..26c56025d56c 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | |||
@@ -51,10 +51,6 @@ | |||
51 | #include "smuio/smuio_9_0_offset.h" | 51 | #include "smuio/smuio_9_0_offset.h" |
52 | #include "smuio/smuio_9_0_sh_mask.h" | 52 | #include "smuio/smuio_9_0_sh_mask.h" |
53 | 53 | ||
54 | #define VOLTAGE_SCALE 4 | ||
55 | #define VOLTAGE_VID_OFFSET_SCALE1 625 | ||
56 | #define VOLTAGE_VID_OFFSET_SCALE2 100 | ||
57 | |||
58 | #define HBM_MEMORY_CHANNEL_WIDTH 128 | 54 | #define HBM_MEMORY_CHANNEL_WIDTH 128 |
59 | 55 | ||
60 | static const uint32_t channel_number[] = {1, 2, 0, 4, 0, 8, 0, 16, 2}; | 56 | static const uint32_t channel_number[] = {1, 2, 0, 4, 0, 8, 0, 16, 2}; |
diff --git a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h index e450ec74d6ed..9b3dd7dce4e2 100644 --- a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h +++ b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | |||
@@ -38,6 +38,8 @@ struct phm_fan_speed_info; | |||
38 | struct pp_atomctrl_voltage_table; | 38 | struct pp_atomctrl_voltage_table; |
39 | 39 | ||
40 | #define VOLTAGE_SCALE 4 | 40 | #define VOLTAGE_SCALE 4 |
41 | #define VOLTAGE_VID_OFFSET_SCALE1 625 | ||
42 | #define VOLTAGE_VID_OFFSET_SCALE2 100 | ||
41 | 43 | ||
42 | enum DISPLAY_GAP { | 44 | enum DISPLAY_GAP { |
43 | DISPLAY_GAP_VBLANK_OR_WM = 0, /* Wait for vblank or MCHG watermark. */ | 45 | DISPLAY_GAP_VBLANK_OR_WM = 0, /* Wait for vblank or MCHG watermark. */ |
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c index c28b95fd1c85..2a93f3a8e4f0 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c +++ b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | |||
@@ -61,9 +61,6 @@ | |||
61 | 61 | ||
62 | #define SMC_RAM_END 0x40000 | 62 | #define SMC_RAM_END 0x40000 |
63 | 63 | ||
64 | #define VOLTAGE_SCALE 4 | ||
65 | #define VOLTAGE_VID_OFFSET_SCALE1 625 | ||
66 | #define VOLTAGE_VID_OFFSET_SCALE2 100 | ||
67 | #define CISLAND_MINIMUM_ENGINE_CLOCK 800 | 64 | #define CISLAND_MINIMUM_ENGINE_CLOCK 800 |
68 | #define CISLAND_MAX_DEEPSLEEP_DIVIDER_ID 5 | 65 | #define CISLAND_MAX_DEEPSLEEP_DIVIDER_ID 5 |
69 | 66 | ||
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c index dae3422366b3..53df9405f43a 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c +++ b/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | |||
@@ -53,10 +53,7 @@ | |||
53 | 53 | ||
54 | #define FIJI_SMC_SIZE 0x20000 | 54 | #define FIJI_SMC_SIZE 0x20000 |
55 | 55 | ||
56 | #define VOLTAGE_SCALE 4 | ||
57 | #define POWERTUNE_DEFAULT_SET_MAX 1 | 56 | #define POWERTUNE_DEFAULT_SET_MAX 1 |
58 | #define VOLTAGE_VID_OFFSET_SCALE1 625 | ||
59 | #define VOLTAGE_VID_OFFSET_SCALE2 100 | ||
60 | #define VDDC_VDDCI_DELTA 300 | 57 | #define VDDC_VDDCI_DELTA 300 |
61 | #define MC_CG_ARB_FREQ_F1 0x0b | 58 | #define MC_CG_ARB_FREQ_F1 0x0b |
62 | 59 | ||
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c index bc05e355012d..415f691c3fa9 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c +++ b/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | |||
@@ -60,10 +60,7 @@ | |||
60 | 60 | ||
61 | #define ICELAND_SMC_SIZE 0x20000 | 61 | #define ICELAND_SMC_SIZE 0x20000 |
62 | 62 | ||
63 | #define VOLTAGE_SCALE 4 | ||
64 | #define POWERTUNE_DEFAULT_SET_MAX 1 | 63 | #define POWERTUNE_DEFAULT_SET_MAX 1 |
65 | #define VOLTAGE_VID_OFFSET_SCALE1 625 | ||
66 | #define VOLTAGE_VID_OFFSET_SCALE2 100 | ||
67 | #define MC_CG_ARB_FREQ_F1 0x0b | 64 | #define MC_CG_ARB_FREQ_F1 0x0b |
68 | #define VDDC_VDDCI_DELTA 200 | 65 | #define VDDC_VDDCI_DELTA 200 |
69 | 66 | ||
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c index d9192286099d..a8c6524f07e4 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +++ b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | |||
@@ -52,8 +52,6 @@ | |||
52 | #include "dce/dce_10_0_sh_mask.h" | 52 | #include "dce/dce_10_0_sh_mask.h" |
53 | 53 | ||
54 | #define POLARIS10_SMC_SIZE 0x20000 | 54 | #define POLARIS10_SMC_SIZE 0x20000 |
55 | #define VOLTAGE_VID_OFFSET_SCALE1 625 | ||
56 | #define VOLTAGE_VID_OFFSET_SCALE2 100 | ||
57 | #define POWERTUNE_DEFAULT_SET_MAX 1 | 55 | #define POWERTUNE_DEFAULT_SET_MAX 1 |
58 | #define VDDC_VDDCI_DELTA 200 | 56 | #define VDDC_VDDCI_DELTA 200 |
59 | #define MC_CG_ARB_FREQ_F1 0x0b | 57 | #define MC_CG_ARB_FREQ_F1 0x0b |
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smu10_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/smu10_smumgr.c index 9adea7263774..0a563f6fe9ea 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/smu10_smumgr.c +++ b/drivers/gpu/drm/amd/powerplay/smumgr/smu10_smumgr.c | |||
@@ -33,8 +33,6 @@ | |||
33 | #include "pp_debug.h" | 33 | #include "pp_debug.h" |
34 | 34 | ||
35 | 35 | ||
36 | #define VOLTAGE_SCALE 4 | ||
37 | |||
38 | #define BUFFER_SIZE 80000 | 36 | #define BUFFER_SIZE 80000 |
39 | #define MAX_STRING_SIZE 15 | 37 | #define MAX_STRING_SIZE 15 |
40 | #define BUFFER_SIZETWO 131072 | 38 | #define BUFFER_SIZETWO 131072 |
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c index 94ba304ff52e..782b19fc2e70 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c +++ b/drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | |||
@@ -55,11 +55,7 @@ | |||
55 | #include "dce/dce_10_0_d.h" | 55 | #include "dce/dce_10_0_d.h" |
56 | #include "dce/dce_10_0_sh_mask.h" | 56 | #include "dce/dce_10_0_sh_mask.h" |
57 | 57 | ||
58 | |||
59 | #define VOLTAGE_SCALE 4 | ||
60 | #define POWERTUNE_DEFAULT_SET_MAX 1 | 58 | #define POWERTUNE_DEFAULT_SET_MAX 1 |
61 | #define VOLTAGE_VID_OFFSET_SCALE1 625 | ||
62 | #define VOLTAGE_VID_OFFSET_SCALE2 100 | ||
63 | #define MC_CG_ARB_FREQ_F1 0x0b | 59 | #define MC_CG_ARB_FREQ_F1 0x0b |
64 | #define VDDC_VDDCI_DELTA 200 | 60 | #define VDDC_VDDCI_DELTA 200 |
65 | 61 | ||
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c index 14ac6d15c7a7..e84669c448a3 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c +++ b/drivers/gpu/drm/amd/powerplay/smumgr/vega10_smumgr.c | |||
@@ -35,8 +35,6 @@ | |||
35 | #define AVFS_EN_MSB 1568 | 35 | #define AVFS_EN_MSB 1568 |
36 | #define AVFS_EN_LSB 1568 | 36 | #define AVFS_EN_LSB 1568 |
37 | 37 | ||
38 | #define VOLTAGE_SCALE 4 | ||
39 | |||
40 | /* Microcode file is stored in this buffer */ | 38 | /* Microcode file is stored in this buffer */ |
41 | #define BUFFER_SIZE 80000 | 39 | #define BUFFER_SIZE 80000 |
42 | #define MAX_STRING_SIZE 15 | 40 | #define MAX_STRING_SIZE 15 |