diff options
author | Tom St Denis <tom.stdenis@amd.com> | 2016-09-06 09:44:47 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-09-12 18:12:21 -0400 |
commit | c3d98645854485ca3c07b0e110ec6d61f77558fa (patch) | |
tree | 9f6dbacd81a9f5ea8a572dea391bec7a39640794 /drivers/gpu/drm/amd/amdgpu | |
parent | 9623e4bfaa5e78727cae5c19b9ee5f94cf6bb24a (diff) |
drm/amd/amdgpu: Clean up SI DPM table assignments
Hoist common assignments out of cases.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/si_dpm.c | 42 |
1 files changed, 10 insertions, 32 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/si_dpm.c b/drivers/gpu/drm/amd/amdgpu/si_dpm.c index 2a72b2b5801d..8d623912891c 100644 --- a/drivers/gpu/drm/amd/amdgpu/si_dpm.c +++ b/drivers/gpu/drm/amd/amdgpu/si_dpm.c | |||
@@ -2014,39 +2014,28 @@ static void si_initialize_powertune_defaults(struct amdgpu_device *adev) | |||
2014 | break; | 2014 | break; |
2015 | } | 2015 | } |
2016 | } else if (adev->asic_type == CHIP_PITCAIRN) { | 2016 | } else if (adev->asic_type == CHIP_PITCAIRN) { |
2017 | si_pi->cac_weights = cac_weights_pitcairn; | ||
2018 | si_pi->lcac_config = lcac_pitcairn; | ||
2019 | si_pi->cac_override = cac_override_pitcairn; | ||
2020 | si_pi->powertune_data = &powertune_data_pitcairn; | ||
2021 | |||
2017 | switch (adev->pdev->device) { | 2022 | switch (adev->pdev->device) { |
2018 | case 0x6810: | 2023 | case 0x6810: |
2019 | case 0x6818: | 2024 | case 0x6818: |
2020 | si_pi->cac_weights = cac_weights_pitcairn; | ||
2021 | si_pi->lcac_config = lcac_pitcairn; | ||
2022 | si_pi->cac_override = cac_override_pitcairn; | ||
2023 | si_pi->powertune_data = &powertune_data_pitcairn; | ||
2024 | si_pi->dte_data = dte_data_curacao_xt; | 2025 | si_pi->dte_data = dte_data_curacao_xt; |
2025 | update_dte_from_pl2 = true; | 2026 | update_dte_from_pl2 = true; |
2026 | break; | 2027 | break; |
2027 | case 0x6819: | 2028 | case 0x6819: |
2028 | case 0x6811: | 2029 | case 0x6811: |
2029 | si_pi->cac_weights = cac_weights_pitcairn; | ||
2030 | si_pi->lcac_config = lcac_pitcairn; | ||
2031 | si_pi->cac_override = cac_override_pitcairn; | ||
2032 | si_pi->powertune_data = &powertune_data_pitcairn; | ||
2033 | si_pi->dte_data = dte_data_curacao_pro; | 2030 | si_pi->dte_data = dte_data_curacao_pro; |
2034 | update_dte_from_pl2 = true; | 2031 | update_dte_from_pl2 = true; |
2035 | break; | 2032 | break; |
2036 | case 0x6800: | 2033 | case 0x6800: |
2037 | case 0x6806: | 2034 | case 0x6806: |
2038 | si_pi->cac_weights = cac_weights_pitcairn; | ||
2039 | si_pi->lcac_config = lcac_pitcairn; | ||
2040 | si_pi->cac_override = cac_override_pitcairn; | ||
2041 | si_pi->powertune_data = &powertune_data_pitcairn; | ||
2042 | si_pi->dte_data = dte_data_neptune_xt; | 2035 | si_pi->dte_data = dte_data_neptune_xt; |
2043 | update_dte_from_pl2 = true; | 2036 | update_dte_from_pl2 = true; |
2044 | break; | 2037 | break; |
2045 | default: | 2038 | default: |
2046 | si_pi->cac_weights = cac_weights_pitcairn; | ||
2047 | si_pi->lcac_config = lcac_pitcairn; | ||
2048 | si_pi->cac_override = cac_override_pitcairn; | ||
2049 | si_pi->powertune_data = &powertune_data_pitcairn; | ||
2050 | si_pi->dte_data = dte_data_pitcairn; | 2039 | si_pi->dte_data = dte_data_pitcairn; |
2051 | break; | 2040 | break; |
2052 | } | 2041 | } |
@@ -2102,16 +2091,17 @@ static void si_initialize_powertune_defaults(struct amdgpu_device *adev) | |||
2102 | break; | 2091 | break; |
2103 | } | 2092 | } |
2104 | } else if (adev->asic_type == CHIP_OLAND) { | 2093 | } else if (adev->asic_type == CHIP_OLAND) { |
2094 | si_pi->lcac_config = lcac_mars_pro; | ||
2095 | si_pi->cac_override = cac_override_oland; | ||
2096 | si_pi->powertune_data = &powertune_data_mars_pro; | ||
2097 | si_pi->dte_data = dte_data_mars_pro; | ||
2098 | |||
2105 | switch (adev->pdev->device) { | 2099 | switch (adev->pdev->device) { |
2106 | case 0x6601: | 2100 | case 0x6601: |
2107 | case 0x6621: | 2101 | case 0x6621: |
2108 | case 0x6603: | 2102 | case 0x6603: |
2109 | case 0x6605: | 2103 | case 0x6605: |
2110 | si_pi->cac_weights = cac_weights_mars_pro; | 2104 | si_pi->cac_weights = cac_weights_mars_pro; |
2111 | si_pi->lcac_config = lcac_mars_pro; | ||
2112 | si_pi->cac_override = cac_override_oland; | ||
2113 | si_pi->powertune_data = &powertune_data_mars_pro; | ||
2114 | si_pi->dte_data = dte_data_mars_pro; | ||
2115 | update_dte_from_pl2 = true; | 2105 | update_dte_from_pl2 = true; |
2116 | break; | 2106 | break; |
2117 | case 0x6600: | 2107 | case 0x6600: |
@@ -2119,28 +2109,16 @@ static void si_initialize_powertune_defaults(struct amdgpu_device *adev) | |||
2119 | case 0x6620: | 2109 | case 0x6620: |
2120 | case 0x6604: | 2110 | case 0x6604: |
2121 | si_pi->cac_weights = cac_weights_mars_xt; | 2111 | si_pi->cac_weights = cac_weights_mars_xt; |
2122 | si_pi->lcac_config = lcac_mars_pro; | ||
2123 | si_pi->cac_override = cac_override_oland; | ||
2124 | si_pi->powertune_data = &powertune_data_mars_pro; | ||
2125 | si_pi->dte_data = dte_data_mars_pro; | ||
2126 | update_dte_from_pl2 = true; | 2112 | update_dte_from_pl2 = true; |
2127 | break; | 2113 | break; |
2128 | case 0x6611: | 2114 | case 0x6611: |
2129 | case 0x6613: | 2115 | case 0x6613: |
2130 | case 0x6608: | 2116 | case 0x6608: |
2131 | si_pi->cac_weights = cac_weights_oland_pro; | 2117 | si_pi->cac_weights = cac_weights_oland_pro; |
2132 | si_pi->lcac_config = lcac_mars_pro; | ||
2133 | si_pi->cac_override = cac_override_oland; | ||
2134 | si_pi->powertune_data = &powertune_data_mars_pro; | ||
2135 | si_pi->dte_data = dte_data_mars_pro; | ||
2136 | update_dte_from_pl2 = true; | 2118 | update_dte_from_pl2 = true; |
2137 | break; | 2119 | break; |
2138 | case 0x6610: | 2120 | case 0x6610: |
2139 | si_pi->cac_weights = cac_weights_oland_xt; | 2121 | si_pi->cac_weights = cac_weights_oland_xt; |
2140 | si_pi->lcac_config = lcac_mars_pro; | ||
2141 | si_pi->cac_override = cac_override_oland; | ||
2142 | si_pi->powertune_data = &powertune_data_mars_pro; | ||
2143 | si_pi->dte_data = dte_data_mars_pro; | ||
2144 | update_dte_from_pl2 = true; | 2122 | update_dte_from_pl2 = true; |
2145 | break; | 2123 | break; |
2146 | default: | 2124 | default: |