| @@ -107,8 +107,7 @@ const struct vega10_power_state *cast_const_phw_vega10_power_state( · 106 unmodified lines |
| 107 | 107 | |
| 108 | 108 | static void vega10_set_default_registry_data(struct pp_hwmgr *hwmgr) |
| 109 | 109 | { |
| 110 | | − struct vega10_hwmgr *data = |
| 111 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 110 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 112 | 111 | |
| 113 | 112 | data->registry_data.sclk_dpm_key_disabled = |
| 114 | 113 | hwmgr->feature_mask & PP_SCLK_DPM_MASK ? false : true; |
| @@ -185,8 +184,7 @@ static void vega10_set_default_registry_data(struct pp_hwmgr *hwmgr) · 70 unmodified lines |
| 185 | 184 | |
| 186 | 185 | static int vega10_set_features_platform_caps(struct pp_hwmgr *hwmgr) |
| 187 | 186 | { |
| 188 | | − struct vega10_hwmgr *data = |
| 189 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 187 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 190 | 188 | struct phm_ppt_v2_information *table_info = |
| 191 | 189 | (struct phm_ppt_v2_information *)hwmgr->pptable; |
| 192 | 190 | struct amdgpu_device *adev = hwmgr->adev; |
| @@ -296,7 +294,7 @@ static int vega10_set_features_platform_caps(struct pp_hwmgr *hwmgr) · 103 unmodified lines |
| 296 | 294 | |
| 297 | 295 | static void vega10_init_dpm_defaults(struct pp_hwmgr *hwmgr) |
| 298 | 296 | { |
| 299 | | − struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); |
| 297 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 300 | 298 | int i; |
| 301 | 299 | uint32_t sub_vendor_id, hw_revision; |
| 302 | 300 | struct amdgpu_device *adev = hwmgr->adev; |
| @@ -484,7 +482,7 @@ static int vega10_get_socclk_for_voltage_evv(struct pp_hwmgr *hwmgr, · 181 unmodified lines |
| 484 | 482 | */ |
| 485 | 483 | static int vega10_get_evv_voltages(struct pp_hwmgr *hwmgr) |
| 486 | 484 | { |
| 487 | | − struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); |
| 485 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 488 | 486 | uint16_t vv_id; |
| 489 | 487 | uint32_t vddc = 0; |
| 490 | 488 | uint16_t i, j; |
| @@ -675,7 +673,7 @@ static int vega10_complete_dependency_tables(struct pp_hwmgr *hwmgr) · 184 unmodified lines |
| 675 | 673 | struct phm_ppt_v2_information *table_info = |
| 676 | 674 | (struct phm_ppt_v2_information *)(hwmgr->pptable); |
| 677 | 675 | #ifdef PPLIB_VEGA10_EVV_SUPPORT |
| 678 | | − struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); |
| 676 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 679 | 677 | |
| 680 | 678 | tmp_result = vega10_patch_lookup_table_with_leakage(hwmgr, |
| 681 | 679 | table_info->vddc_lookup_table, &(data->vddc_leakage)); |
| @@ -878,8 +876,7 @@ static int vega10_hwmgr_backend_init(struct pp_hwmgr *hwmgr) · 196 unmodified lines |
| 878 | 876 | |
| 879 | 877 | static int vega10_init_sclk_threshold(struct pp_hwmgr *hwmgr) |
| 880 | 878 | { |
| 881 | | − struct vega10_hwmgr *data = |
| 882 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 879 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 883 | 880 | |
| 884 | 881 | data->low_sclk_interrupt_threshold = 0; |
| 885 | 882 | |
| @@ -888,8 +885,7 @@ static int vega10_init_sclk_threshold(struct pp_hwmgr *hwmgr) · 2 unmodified lines |
| 888 | 885 | |
| 889 | 886 | static int vega10_setup_dpm_led_config(struct pp_hwmgr *hwmgr) |
| 890 | 887 | { |
| 891 | | − struct vega10_hwmgr *data = |
| 892 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 888 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 893 | 889 | PPTable_t *pp_table = &(data->smc_state_table.pp_table); |
| 894 | 890 | |
| 895 | 891 | struct pp_atomfwctrl_voltage_table table; |
| @@ -1092,7 +1088,7 @@ static void vega10_trim_voltage_table_to_fit_state_table( · 196 unmodified lines |
| 1092 | 1088 | */ |
| 1093 | 1089 | static int vega10_construct_voltage_tables(struct pp_hwmgr *hwmgr) |
| 1094 | 1090 | { |
| 1095 | | − struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); |
| 1091 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 1096 | 1092 | struct phm_ppt_v2_information *table_info = |
| 1097 | 1093 | (struct phm_ppt_v2_information *)hwmgr->pptable; |
| 1098 | 1094 | int result; |
| @@ -1180,8 +1176,7 @@ static void vega10_setup_default_single_dpm_table(struct pp_hwmgr *hwmgr, · 81 unmodified lines |
| 1180 | 1176 | } |
| 1181 | 1177 | static int vega10_setup_default_pcie_table(struct pp_hwmgr *hwmgr) |
| 1182 | 1178 | { |
| 1183 | | − struct vega10_hwmgr *data = |
| 1184 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 1179 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 1185 | 1180 | struct vega10_pcie_table *pcie_table = &(data->dpm_table.pcie_table); |
| 1186 | 1181 | struct phm_ppt_v2_information *table_info = |
| 1187 | 1182 | (struct phm_ppt_v2_information *)(hwmgr->pptable); |
| @@ -1230,8 +1225,7 @@ static int vega10_setup_default_pcie_table(struct pp_hwmgr *hwmgr) · 42 unmodified lines |
| 1230 | 1225 | */ |
| 1231 | 1226 | static int vega10_setup_default_dpm_tables(struct pp_hwmgr *hwmgr) |
| 1232 | 1227 | { |
| 1233 | | − struct vega10_hwmgr *data = |
| 1234 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 1228 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 1235 | 1229 | struct phm_ppt_v2_information *table_info = |
| 1236 | 1230 | (struct phm_ppt_v2_information *)(hwmgr->pptable); |
| 1237 | 1231 | struct vega10_single_dpm_table *dpm_table; |
| @@ -1431,8 +1425,7 @@ static int vega10_setup_default_dpm_tables(struct pp_hwmgr *hwmgr) · 193 unmodified lines |
| 1431 | 1425 | */ |
| 1432 | 1426 | static int vega10_populate_ulv_state(struct pp_hwmgr *hwmgr) |
| 1433 | 1427 | { |
| 1434 | | − struct vega10_hwmgr *data = |
| 1435 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 1428 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 1436 | 1429 | struct phm_ppt_v2_information *table_info = |
| 1437 | 1430 | (struct phm_ppt_v2_information *)(hwmgr->pptable); |
| 1438 | 1431 | |
| @@ -1473,8 +1466,7 @@ static int vega10_populate_single_lclk_level(struct pp_hwmgr *hwmgr, · 34 unmodified lines |
| 1473 | 1466 | static int vega10_populate_smc_link_levels(struct pp_hwmgr *hwmgr) |
| 1474 | 1467 | { |
| 1475 | 1468 | int result = -1; |
| 1476 | | − struct vega10_hwmgr *data = |
| 1477 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 1469 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 1478 | 1470 | PPTable_t *pp_table = &(data->smc_state_table.pp_table); |
| 1479 | 1471 | struct vega10_pcie_table *pcie_table = |
| 1480 | 1472 | &(data->dpm_table.pcie_table); |
| @@ -1525,8 +1517,7 @@ static int vega10_populate_single_gfx_level(struct pp_hwmgr *hwmgr, · 44 unmodified lines |
| 1525 | 1517 | (struct phm_ppt_v2_information *)(hwmgr->pptable); |
| 1526 | 1518 | struct phm_ppt_v1_clock_voltage_dependency_table *dep_on_sclk = |
| 1527 | 1519 | table_info->vdd_dep_on_sclk; |
| 1528 | | − struct vega10_hwmgr *data = |
| 1529 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 1520 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 1530 | 1521 | struct pp_atomfwctrl_clock_dividers_soc15 dividers; |
| 1531 | 1522 | uint32_t gfx_max_clock = |
| 1532 | 1523 | hwmgr->platform_descriptor.overdriveLimit.engineClock; |
| @@ -1638,8 +1629,7 @@ uint16_t vega10_locate_vddc_given_clock(struct pp_hwmgr *hwmgr, · 105 unmodified lines |
| 1638 | 1629 | */ |
| 1639 | 1630 | static int vega10_populate_all_graphic_levels(struct pp_hwmgr *hwmgr) |
| 1640 | 1631 | { |
| 1641 | | − struct vega10_hwmgr *data = |
| 1642 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 1632 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 1643 | 1633 | struct phm_ppt_v2_information *table_info = |
| 1644 | 1634 | (struct phm_ppt_v2_information *)(hwmgr->pptable); |
| 1645 | 1635 | struct phm_ppt_v1_clock_voltage_dependency_table *dep_table = |
| @@ -1713,8 +1703,7 @@ static int vega10_populate_single_memory_level(struct pp_hwmgr *hwmgr, · 67 unmodified lines |
| 1713 | 1703 | uint32_t mem_clock, uint8_t *current_mem_vid, |
| 1714 | 1704 | PllSetting_t *current_memclk_level, uint8_t *current_mem_soc_vind) |
| 1715 | 1705 | { |
| 1716 | | − struct vega10_hwmgr *data = |
| 1717 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 1706 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 1718 | 1707 | struct phm_ppt_v2_information *table_info = |
| 1719 | 1708 | (struct phm_ppt_v2_information *)(hwmgr->pptable); |
| 1720 | 1709 | struct phm_ppt_v1_clock_voltage_dependency_table *dep_on_mclk = |
| @@ -1772,8 +1761,7 @@ static int vega10_populate_single_memory_level(struct pp_hwmgr *hwmgr, · 51 unmodified lines |
| 1772 | 1761 | */ |
| 1773 | 1762 | static int vega10_populate_all_memory_levels(struct pp_hwmgr *hwmgr) |
| 1774 | 1763 | { |
| 1775 | | − struct vega10_hwmgr *data = |
| 1776 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 1764 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 1777 | 1765 | PPTable_t *pp_table = &(data->smc_state_table.pp_table); |
| 1778 | 1766 | struct vega10_single_dpm_table *dpm_table = |
| 1779 | 1767 | &(data->dpm_table.mem_table); |
| @@ -1816,8 +1804,7 @@ static int vega10_populate_all_memory_levels(struct pp_hwmgr *hwmgr) · 36 unmodified lines |
| 1816 | 1804 | static int vega10_populate_single_display_type(struct pp_hwmgr *hwmgr, |
| 1817 | 1805 | DSPCLK_e disp_clock) |
| 1818 | 1806 | { |
| 1819 | | − struct vega10_hwmgr *data = |
| 1820 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 1807 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 1821 | 1808 | PPTable_t *pp_table = &(data->smc_state_table.pp_table); |
| 1822 | 1809 | struct phm_ppt_v2_information *table_info = |
| 1823 | 1810 | (struct phm_ppt_v2_information *) |
| @@ -1912,8 +1899,7 @@ static int vega10_populate_single_eclock_level(struct pp_hwmgr *hwmgr, · 88 unmodified lines |
| 1912 | 1899 | |
| 1913 | 1900 | static int vega10_populate_smc_vce_levels(struct pp_hwmgr *hwmgr) |
| 1914 | 1901 | { |
| 1915 | | − struct vega10_hwmgr *data = |
| 1916 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 1902 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 1917 | 1903 | PPTable_t *pp_table = &(data->smc_state_table.pp_table); |
| 1918 | 1904 | struct vega10_single_dpm_table *dpm_table = &(data->dpm_table.eclk_table); |
| 1919 | 1905 | int result = -EINVAL; |
| @@ -1976,8 +1962,7 @@ static int vega10_populate_single_dclock_level(struct pp_hwmgr *hwmgr, · 56 unmodified lines |
| 1976 | 1962 | |
| 1977 | 1963 | static int vega10_populate_smc_uvd_levels(struct pp_hwmgr *hwmgr) |
| 1978 | 1964 | { |
| 1979 | | − struct vega10_hwmgr *data = |
| 1980 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 1965 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 1981 | 1966 | PPTable_t *pp_table = &(data->smc_state_table.pp_table); |
| 1982 | 1967 | struct vega10_single_dpm_table *vclk_dpm_table = |
| 1983 | 1968 | &(data->dpm_table.vclk_table); |
| @@ -2048,8 +2033,7 @@ static int vega10_populate_smc_uvd_levels(struct pp_hwmgr *hwmgr) · 64 unmodified lines |
| 2048 | 2033 | |
| 2049 | 2034 | static int vega10_populate_clock_stretcher_table(struct pp_hwmgr *hwmgr) |
| 2050 | 2035 | { |
| 2051 | | − struct vega10_hwmgr *data = |
| 2052 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 2036 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 2053 | 2037 | PPTable_t *pp_table = &(data->smc_state_table.pp_table); |
| 2054 | 2038 | struct phm_ppt_v2_information *table_info = |
| 2055 | 2039 | (struct phm_ppt_v2_information *)(hwmgr->pptable); |
| @@ -2068,8 +2052,7 @@ static int vega10_populate_clock_stretcher_table(struct pp_hwmgr *hwmgr) · 12 unmodified lines |
| 2068 | 2052 | |
| 2069 | 2053 | static int vega10_populate_avfs_parameters(struct pp_hwmgr *hwmgr) |
| 2070 | 2054 | { |
| 2071 | | − struct vega10_hwmgr *data = |
| 2072 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 2055 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 2073 | 2056 | PPTable_t *pp_table = &(data->smc_state_table.pp_table); |
| 2074 | 2057 | struct phm_ppt_v2_information *table_info = |
| 2075 | 2058 | (struct phm_ppt_v2_information *)(hwmgr->pptable); |
| @@ -2260,8 +2243,7 @@ static int vega10_populate_avfs_parameters(struct pp_hwmgr *hwmgr) · 184 unmodified lines |
| 2260 | 2243 | |
| 2261 | 2244 | static int vega10_acg_enable(struct pp_hwmgr *hwmgr) |
| 2262 | 2245 | { |
| 2263 | | − struct vega10_hwmgr *data = |
| 2264 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 2246 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 2265 | 2247 | uint32_t agc_btc_response; |
| 2266 | 2248 | |
| 2267 | 2249 | if (data->smu_features[GNLD_ACG].supported) { |
| @@ -2293,8 +2275,7 @@ static int vega10_acg_enable(struct pp_hwmgr *hwmgr) · 25 unmodified lines |
| 2293 | 2275 | |
| 2294 | 2276 | static int vega10_acg_disable(struct pp_hwmgr *hwmgr) |
| 2295 | 2277 | { |
| 2296 | | − struct vega10_hwmgr *data = |
| 2297 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 2278 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 2298 | 2279 | |
| 2299 | 2280 | if (data->smu_features[GNLD_ACG].supported && |
| 2300 | 2281 | data->smu_features[GNLD_ACG].enabled) |
| @@ -2307,8 +2288,7 @@ static int vega10_acg_disable(struct pp_hwmgr *hwmgr) · 6 unmodified lines |
| 2307 | 2288 | |
| 2308 | 2289 | static int vega10_populate_gpio_parameters(struct pp_hwmgr *hwmgr) |
| 2309 | 2290 | { |
| 2310 | | − struct vega10_hwmgr *data = |
| 2311 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 2291 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 2312 | 2292 | PPTable_t *pp_table = &(data->smc_state_table.pp_table); |
| 2313 | 2293 | struct pp_atomfwctrl_gpio_parameters gpio_params = {0}; |
| 2314 | 2294 | int result; |
| @@ -2343,8 +2323,7 @@ static int vega10_populate_gpio_parameters(struct pp_hwmgr *hwmgr) · 28 unmodified lines |
| 2343 | 2323 | |
| 2344 | 2324 | static int vega10_avfs_enable(struct pp_hwmgr *hwmgr, bool enable) |
| 2345 | 2325 | { |
| 2346 | | − struct vega10_hwmgr *data = |
| 2347 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 2326 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 2348 | 2327 | |
| 2349 | 2328 | if (data->smu_features[GNLD_AVFS].supported) { |
| 2350 | 2329 | if (enable) { |
| @@ -2375,7 +2354,7 @@ static int vega10_populate_and_upload_avfs_fuse_override(struct pp_hwmgr *hwmgr) · 24 unmodified lines |
| 2375 | 2354 | uint32_t top32, bottom32; |
| 2376 | 2355 | struct phm_fuses_default fuse; |
| 2377 | 2356 | |
| 2378 | | − struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); |
| 2357 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 2379 | 2358 | AvfsFuseOverride_t *avfs_fuse_table = &(data->smc_state_table.avfs_fuse_override_table); |
| 2380 | 2359 | |
| 2381 | 2360 | smum_send_msg_to_smc(hwmgr, PPSMC_MSG_ReadSerialNumTop32); |
| @@ -2416,8 +2395,7 @@ static int vega10_populate_and_upload_avfs_fuse_override(struct pp_hwmgr *hwmgr) · 34 unmodified lines |
| 2416 | 2395 | static int vega10_init_smc_table(struct pp_hwmgr *hwmgr) |
| 2417 | 2396 | { |
| 2418 | 2397 | int result; |
| 2419 | | − struct vega10_hwmgr *data = |
| 2420 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 2398 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 2421 | 2399 | struct phm_ppt_v2_information *table_info = |
| 2422 | 2400 | (struct phm_ppt_v2_information *)(hwmgr->pptable); |
| 2423 | 2401 | PPTable_t *pp_table = &(data->smc_state_table.pp_table); |
| @@ -2555,7 +2533,7 @@ static int vega10_init_smc_table(struct pp_hwmgr *hwmgr) · 131 unmodified lines |
| 2555 | 2533 | |
| 2556 | 2534 | static int vega10_enable_thermal_protection(struct pp_hwmgr *hwmgr) |
| 2557 | 2535 | { |
| 2558 | | − struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); |
| 2536 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 2559 | 2537 | |
| 2560 | 2538 | if (data->smu_features[GNLD_THERMAL].supported) { |
| 2561 | 2539 | if (data->smu_features[GNLD_THERMAL].enabled) |
| @@ -2575,7 +2553,7 @@ static int vega10_enable_thermal_protection(struct pp_hwmgr *hwmgr) · 13 unmodified lines |
| 2575 | 2553 | |
| 2576 | 2554 | static int vega10_disable_thermal_protection(struct pp_hwmgr *hwmgr) |
| 2577 | 2555 | { |
| 2578 | | − struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); |
| 2556 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 2579 | 2557 | |
| 2580 | 2558 | if (data->smu_features[GNLD_THERMAL].supported) { |
| 2581 | 2559 | if (!data->smu_features[GNLD_THERMAL].enabled) |
| @@ -2595,8 +2573,7 @@ static int vega10_disable_thermal_protection(struct pp_hwmgr *hwmgr) · 13 unmodified lines |
| 2595 | 2573 | |
| 2596 | 2574 | static int vega10_enable_vrhot_feature(struct pp_hwmgr *hwmgr) |
| 2597 | 2575 | { |
| 2598 | | − struct vega10_hwmgr *data = |
| 2599 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 2576 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 2600 | 2577 | |
| 2601 | 2578 | if (PP_CAP(PHM_PlatformCaps_RegulatorHot)) { |
| 2602 | 2579 | if (data->smu_features[GNLD_VR0HOT].supported) { |
| @@ -2624,8 +2601,7 @@ static int vega10_enable_vrhot_feature(struct pp_hwmgr *hwmgr) · 21 unmodified lines |
| 2624 | 2601 | |
| 2625 | 2602 | static int vega10_enable_ulv(struct pp_hwmgr *hwmgr) |
| 2626 | 2603 | { |
| 2627 | | − struct vega10_hwmgr *data = |
| 2628 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 2604 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 2629 | 2605 | |
| 2630 | 2606 | if (data->registry_data.ulv_support) { |
| 2631 | 2607 | PP_ASSERT_WITH_CODE(!vega10_enable_smc_features(hwmgr, |
| @@ -2640,8 +2616,7 @@ static int vega10_enable_ulv(struct pp_hwmgr *hwmgr) · 8 unmodified lines |
| 2640 | 2616 | |
| 2641 | 2617 | static int vega10_disable_ulv(struct pp_hwmgr *hwmgr) |
| 2642 | 2618 | { |
| 2643 | | − struct vega10_hwmgr *data = |
| 2644 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 2619 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 2645 | 2620 | |
| 2646 | 2621 | if (data->registry_data.ulv_support) { |
| 2647 | 2622 | PP_ASSERT_WITH_CODE(!vega10_enable_smc_features(hwmgr, |
| @@ -2656,8 +2631,7 @@ static int vega10_disable_ulv(struct pp_hwmgr *hwmgr) · 8 unmodified lines |
| 2656 | 2631 | |
| 2657 | 2632 | static int vega10_enable_deep_sleep_master_switch(struct pp_hwmgr *hwmgr) |
| 2658 | 2633 | { |
| 2659 | | − struct vega10_hwmgr *data = |
| 2660 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 2634 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 2661 | 2635 | |
| 2662 | 2636 | if (data->smu_features[GNLD_DS_GFXCLK].supported) { |
| 2663 | 2637 | PP_ASSERT_WITH_CODE(!vega10_enable_smc_features(hwmgr, |
| @@ -2696,8 +2670,7 @@ static int vega10_enable_deep_sleep_master_switch(struct pp_hwmgr *hwmgr) · 32 unmodified lines |
| 2696 | 2670 | |
| 2697 | 2671 | static int vega10_disable_deep_sleep_master_switch(struct pp_hwmgr *hwmgr) |
| 2698 | 2672 | { |
| 2699 | | − struct vega10_hwmgr *data = |
| 2700 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 2673 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 2701 | 2674 | |
| 2702 | 2675 | if (data->smu_features[GNLD_DS_GFXCLK].supported) { |
| 2703 | 2676 | PP_ASSERT_WITH_CODE(!vega10_enable_smc_features(hwmgr, |
| @@ -2736,8 +2709,7 @@ static int vega10_disable_deep_sleep_master_switch(struct pp_hwmgr *hwmgr) · 32 unmodified lines |
| 2736 | 2709 | |
| 2737 | 2710 | static int vega10_stop_dpm(struct pp_hwmgr *hwmgr, uint32_t bitmap) |
| 2738 | 2711 | { |
| 2739 | | − struct vega10_hwmgr *data = |
| 2740 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 2712 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 2741 | 2713 | uint32_t i, feature_mask = 0; |
| 2742 | 2714 | |
| 2743 | 2715 | |
| @@ -2774,8 +2746,7 @@ static int vega10_stop_dpm(struct pp_hwmgr *hwmgr, uint32_t bitmap) · 30 unmodified lines |
| 2774 | 2746 | */ |
| 2775 | 2747 | static int vega10_start_dpm(struct pp_hwmgr *hwmgr, uint32_t bitmap) |
| 2776 | 2748 | { |
| 2777 | | − struct vega10_hwmgr *data = |
| 2778 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 2749 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 2779 | 2750 | uint32_t i, feature_mask = 0; |
| 2780 | 2751 | |
| 2781 | 2752 | for (i = 0; i < GNLD_DPM_MAX; i++) { |
| @@ -2827,8 +2798,7 @@ static int vega10_start_dpm(struct pp_hwmgr *hwmgr, uint32_t bitmap) · 45 unmodified lines |
| 2827 | 2798 | |
| 2828 | 2799 | static int vega10_enable_disable_PCC_limit_feature(struct pp_hwmgr *hwmgr, bool enable) |
| 2829 | 2800 | { |
| 2830 | | − struct vega10_hwmgr *data = |
| 2831 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 2801 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 2832 | 2802 | |
| 2833 | 2803 | if (data->smu_features[GNLD_PCC_LIMIT].supported) { |
| 2834 | 2804 | if (enable == data->smu_features[GNLD_PCC_LIMIT].enabled) |
| @@ -2845,8 +2815,7 @@ static int vega10_enable_disable_PCC_limit_feature(struct pp_hwmgr *hwmgr, bool · 10 unmodified lines |
| 2845 | 2815 | |
| 2846 | 2816 | static int vega10_enable_dpm_tasks(struct pp_hwmgr *hwmgr) |
| 2847 | 2817 | { |
| 2848 | | − struct vega10_hwmgr *data = |
| 2849 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 2818 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 2850 | 2819 | int tmp_result, result = 0; |
| 2851 | 2820 | |
| 2852 | 2821 | vega10_enable_disable_PCC_limit_feature(hwmgr, true); |
| @@ -3063,7 +3032,7 @@ static int vega10_apply_state_adjust_rules(struct pp_hwmgr *hwmgr, · 210 unmodified lines |
| 3063 | 3032 | struct cgs_display_info info = {0}; |
| 3064 | 3033 | const struct phm_clock_and_voltage_limits *max_limits; |
| 3065 | 3034 | uint32_t i; |
| 3066 | | − struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); |
| 3035 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 3067 | 3036 | struct phm_ppt_v2_information *table_info = |
| 3068 | 3037 | (struct phm_ppt_v2_information *)(hwmgr->pptable); |
| 3069 | 3038 | int32_t count; |
| @@ -3207,8 +3176,7 @@ static int vega10_find_dpm_states_clocks_in_dpm_table(struct pp_hwmgr *hwmgr, co · 137 unmodified lines |
| 3207 | 3176 | (const struct phm_set_power_state_input *)input; |
| 3208 | 3177 | const struct vega10_power_state *vega10_ps = |
| 3209 | 3178 | cast_const_phw_vega10_power_state(states->pnew_state); |
| 3210 | | − struct vega10_hwmgr *data = |
| 3211 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 3179 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 3212 | 3180 | struct vega10_single_dpm_table *sclk_table = |
| 3213 | 3181 | &(data->dpm_table.gfx_table); |
| 3214 | 3182 | uint32_t sclk = vega10_ps->performance_levels |
| @@ -3296,8 +3264,7 @@ static int vega10_populate_and_upload_sclk_mclk_dpm_levels( · 81 unmodified lines |
| 3296 | 3264 | (const struct phm_set_power_state_input *)input; |
| 3297 | 3265 | const struct vega10_power_state *vega10_ps = |
| 3298 | 3266 | cast_const_phw_vega10_power_state(states->pnew_state); |
| 3299 | | − struct vega10_hwmgr *data = |
| 3300 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 3267 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 3301 | 3268 | uint32_t sclk = vega10_ps->performance_levels |
| 3302 | 3269 | [vega10_ps->performance_level_count - 1].gfx_clock; |
| 3303 | 3270 | uint32_t mclk = vega10_ps->performance_levels |
| @@ -3522,8 +3489,7 @@ static int vega10_trim_single_dpm_states_with_mask(struct pp_hwmgr *hwmgr, · 218 unmodified lines |
| 3522 | 3489 | static int vega10_trim_dpm_states(struct pp_hwmgr *hwmgr, |
| 3523 | 3490 | const struct vega10_power_state *vega10_ps) |
| 3524 | 3491 | { |
| 3525 | | − struct vega10_hwmgr *data = |
| 3526 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 3492 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 3527 | 3493 | uint32_t high_limit_count; |
| 3528 | 3494 | |
| 3529 | 3495 | PP_ASSERT_WITH_CODE((vega10_ps->performance_level_count >= 1), |
| @@ -3601,8 +3567,7 @@ static int vega10_get_soc_index_for_max_uclk(struct pp_hwmgr *hwmgr) · 71 unmodified lines |
| 3601 | 3567 | |
| 3602 | 3568 | static int vega10_upload_dpm_bootup_level(struct pp_hwmgr *hwmgr) |
| 3603 | 3569 | { |
| 3604 | | − struct vega10_hwmgr *data = |
| 3605 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 3570 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 3606 | 3571 | uint32_t socclk_idx; |
| 3607 | 3572 | |
| 3608 | 3573 | vega10_apply_dal_minimum_voltage_request(hwmgr); |
| @@ -3641,8 +3606,7 @@ static int vega10_upload_dpm_bootup_level(struct pp_hwmgr *hwmgr) · 32 unmodified lines |
| 3641 | 3606 | |
| 3642 | 3607 | static int vega10_upload_dpm_max_level(struct pp_hwmgr *hwmgr) |
| 3643 | 3608 | { |
| 3644 | | − struct vega10_hwmgr *data = |
| 3645 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 3609 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 3646 | 3610 | |
| 3647 | 3611 | vega10_apply_dal_minimum_voltage_request(hwmgr); |
| 3648 | 3612 | |
| @@ -3674,8 +3638,7 @@ static int vega10_upload_dpm_max_level(struct pp_hwmgr *hwmgr) · 25 unmodified lines |
| 3674 | 3638 | static int vega10_generate_dpm_level_enable_mask( |
| 3675 | 3639 | struct pp_hwmgr *hwmgr, const void *input) |
| 3676 | 3640 | { |
| 3677 | | − struct vega10_hwmgr *data = |
| 3678 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 3641 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 3679 | 3642 | const struct phm_set_power_state_input *states = |
| 3680 | 3643 | (const struct phm_set_power_state_input *)input; |
| 3681 | 3644 | const struct vega10_power_state *vega10_ps = |
| @@ -3713,8 +3676,7 @@ static int vega10_generate_dpm_level_enable_mask( · 31 unmodified lines |
| 3713 | 3676 | |
| 3714 | 3677 | int vega10_enable_disable_vce_dpm(struct pp_hwmgr *hwmgr, bool enable) |
| 3715 | 3678 | { |
| 3716 | | − struct vega10_hwmgr *data = |
| 3717 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 3679 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 3718 | 3680 | |
| 3719 | 3681 | if (data->smu_features[GNLD_DPM_VCE].supported) { |
| 3720 | 3682 | PP_ASSERT_WITH_CODE(!vega10_enable_smc_features(hwmgr, |
| @@ -3730,8 +3692,7 @@ int vega10_enable_disable_vce_dpm(struct pp_hwmgr *hwmgr, bool enable) · 9 unmodified lines |
| 3730 | 3692 | |
| 3731 | 3693 | static int vega10_update_sclk_threshold(struct pp_hwmgr *hwmgr) |
| 3732 | 3694 | { |
| 3733 | | − struct vega10_hwmgr *data = |
| 3734 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 3695 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 3735 | 3696 | uint32_t low_sclk_interrupt_threshold = 0; |
| 3736 | 3697 | |
| 3737 | 3698 | if (PP_CAP(PHM_PlatformCaps_SclkThrottleLowNotification) && |
| @@ -3755,8 +3716,7 @@ static int vega10_set_power_state_tasks(struct pp_hwmgr *hwmgr, · 17 unmodified lines |
| 3755 | 3716 | const void *input) |
| 3756 | 3717 | { |
| 3757 | 3718 | int tmp_result, result = 0; |
| 3758 | | − struct vega10_hwmgr *data = |
| 3759 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 3719 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 3760 | 3720 | PPTable_t *pp_table = &(data->smc_state_table.pp_table); |
| 3761 | 3721 | |
| 3762 | 3722 | tmp_result = vega10_find_dpm_states_clocks_in_dpm_table(hwmgr, input); |
| @@ -3852,7 +3812,7 @@ static int vega10_read_sensor(struct pp_hwmgr *hwmgr, int idx, · 89 unmodified lines |
| 3852 | 3812 | void *value, int *size) |
| 3853 | 3813 | { |
| 3854 | 3814 | uint32_t sclk_idx, mclk_idx, activity_percent = 0; |
| 3855 | | − struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); |
| 3815 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 3856 | 3816 | struct vega10_dpm_table *dpm_table = &data->dpm_table; |
| 3857 | 3817 | int ret = 0; |
| 3858 | 3818 | uint32_t reg, val_vid; |
| @@ -3990,8 +3950,7 @@ static uint8_t vega10_get_uclk_index(struct pp_hwmgr *hwmgr, · 131 unmodified lines |
| 3990 | 3950 | static int vega10_notify_smc_display_config_after_ps_adjustment( |
| 3991 | 3951 | struct pp_hwmgr *hwmgr) |
| 3992 | 3952 | { |
| 3993 | | − struct vega10_hwmgr *data = |
| 3994 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 3953 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 3995 | 3954 | struct vega10_single_dpm_table *dpm_table = |
| 3996 | 3955 | &data->dpm_table.dcef_table; |
| 3997 | 3956 | struct phm_ppt_v2_information *table_info = |
| @@ -4049,8 +4008,7 @@ static int vega10_notify_smc_display_config_after_ps_adjustment( · 51 unmodified lines |
| 4049 | 4008 | |
| 4050 | 4009 | static int vega10_force_dpm_highest(struct pp_hwmgr *hwmgr) |
| 4051 | 4010 | { |
| 4052 | | − struct vega10_hwmgr *data = |
| 4053 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 4011 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 4054 | 4012 | |
| 4055 | 4013 | data->smc_state_table.gfx_boot_level = |
| 4056 | 4014 | data->smc_state_table.gfx_max_level = |
| @@ -4072,8 +4030,7 @@ static int vega10_force_dpm_highest(struct pp_hwmgr *hwmgr) · 15 unmodified lines |
| 4072 | 4030 | |
| 4073 | 4031 | static int vega10_force_dpm_lowest(struct pp_hwmgr *hwmgr) |
| 4074 | 4032 | { |
| 4075 | | − struct vega10_hwmgr *data = |
| 4076 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 4033 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 4077 | 4034 | |
| 4078 | 4035 | data->smc_state_table.gfx_boot_level = |
| 4079 | 4036 | data->smc_state_table.gfx_max_level = |
| @@ -4096,7 +4053,7 @@ static int vega10_force_dpm_lowest(struct pp_hwmgr *hwmgr) · 16 unmodified lines |
| 4096 | 4053 | |
| 4097 | 4054 | static int vega10_unforce_dpm_levels(struct pp_hwmgr *hwmgr) |
| 4098 | 4055 | { |
| 4099 | | − struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); |
| 4056 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 4100 | 4057 | |
| 4101 | 4058 | data->smc_state_table.gfx_boot_level = |
| 4102 | 4059 | vega10_find_lowest_dpm_level(&(data->dpm_table.gfx_table)); |
| @@ -4213,7 +4170,7 @@ static int vega10_dpm_force_dpm_level(struct pp_hwmgr *hwmgr, · 110 unmodified lines |
| 4213 | 4170 | |
| 4214 | 4171 | static uint32_t vega10_get_fan_control_mode(struct pp_hwmgr *hwmgr) |
| 4215 | 4172 | { |
| 4216 | | − struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); |
| 4173 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 4217 | 4174 | |
| 4218 | 4175 | if (data->smu_features[GNLD_FAN_CONTROL].enabled == false) |
| 4219 | 4176 | return AMD_FAN_CTRL_MANUAL; |
| @@ -4273,7 +4230,7 @@ static void vega10_get_memclocks(struct pp_hwmgr *hwmgr, · 53 unmodified lines |
| 4273 | 4230 | (struct phm_ppt_v2_information *)hwmgr->pptable; |
| 4274 | 4231 | struct phm_ppt_v1_clock_voltage_dependency_table *dep_table = |
| 4275 | 4232 | table_info->vdd_dep_on_mclk; |
| 4276 | | − struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); |
| 4233 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 4277 | 4234 | uint32_t i; |
| 4278 | 4235 | |
| 4279 | 4236 | clocks->num_levels = 0; |
| @@ -4397,7 +4354,7 @@ static int vega10_get_clock_by_type_with_voltage(struct pp_hwmgr *hwmgr, · 117 unmodified lines |
| 4397 | 4354 | static int vega10_set_watermarks_for_clocks_ranges(struct pp_hwmgr *hwmgr, |
| 4398 | 4355 | struct pp_wm_sets_with_clock_ranges_soc15 *wm_with_clock_ranges) |
| 4399 | 4356 | { |
| 4400 | | − struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); |
| 4357 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 4401 | 4358 | Watermarks_t *table = &(data->smc_state_table.water_marks_table); |
| 4402 | 4359 | int result = 0; |
| 4403 | 4360 | uint32_t i; |
| @@ -4453,7 +4410,7 @@ static int vega10_set_watermarks_for_clocks_ranges(struct pp_hwmgr *hwmgr, · 49 unmodified lines |
| 4453 | 4410 | static int vega10_force_clock_level(struct pp_hwmgr *hwmgr, |
| 4454 | 4411 | enum pp_clock_type type, uint32_t mask) |
| 4455 | 4412 | { |
| 4456 | | − struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); |
| 4413 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 4457 | 4414 | |
| 4458 | 4415 | switch (type) { |
| 4459 | 4416 | case PP_SCLK: |
| @@ -4494,7 +4451,7 @@ static int vega10_force_clock_level(struct pp_hwmgr *hwmgr, · 34 unmodified lines |
| 4494 | 4451 | static int vega10_print_clock_levels(struct pp_hwmgr *hwmgr, |
| 4495 | 4452 | enum pp_clock_type type, char *buf) |
| 4496 | 4453 | { |
| 4497 | | − struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); |
| 4454 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 4498 | 4455 | struct vega10_single_dpm_table *sclk_table = &(data->dpm_table.gfx_table); |
| 4499 | 4456 | struct vega10_single_dpm_table *mclk_table = &(data->dpm_table.mem_table); |
| 4500 | 4457 | struct vega10_pcie_table *pcie_table = &(data->dpm_table.pcie_table); |
| @@ -4544,7 +4501,7 @@ static int vega10_print_clock_levels(struct pp_hwmgr *hwmgr, · 43 unmodified lines |
| 4544 | 4501 | |
| 4545 | 4502 | static int vega10_display_configuration_changed_task(struct pp_hwmgr *hwmgr) |
| 4546 | 4503 | { |
| 4547 | | − struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); |
| 4504 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 4548 | 4505 | int result = 0; |
| 4549 | 4506 | uint32_t num_turned_on_displays = 1; |
| 4550 | 4507 | Watermarks_t *wm_table = &(data->smc_state_table.water_marks_table); |
| @@ -4569,8 +4526,7 @@ static int vega10_display_configuration_changed_task(struct pp_hwmgr *hwmgr) · 18 unmodified lines |
| 4569 | 4526 | |
| 4570 | 4527 | int vega10_enable_disable_uvd_dpm(struct pp_hwmgr *hwmgr, bool enable) |
| 4571 | 4528 | { |
| 4572 | | − struct vega10_hwmgr *data = |
| 4573 | | − (struct vega10_hwmgr *)(hwmgr->backend); |
| 4529 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 4574 | 4530 | |
| 4575 | 4531 | if (data->smu_features[GNLD_DPM_UVD].supported) { |
| 4576 | 4532 | PP_ASSERT_WITH_CODE(!vega10_enable_smc_features(hwmgr, |
| @@ -4585,7 +4541,7 @@ int vega10_enable_disable_uvd_dpm(struct pp_hwmgr *hwmgr, bool enable) · 8 unmodified lines |
| 4585 | 4541 | |
| 4586 | 4542 | static void vega10_power_gate_vce(struct pp_hwmgr *hwmgr, bool bgate) |
| 4587 | 4543 | { |
| 4588 | | − struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); |
| 4544 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 4589 | 4545 | |
| 4590 | 4546 | data->vce_power_gated = bgate; |
| 4591 | 4547 | vega10_enable_disable_vce_dpm(hwmgr, !bgate); |
| @@ -4593,7 +4549,7 @@ static void vega10_power_gate_vce(struct pp_hwmgr *hwmgr, bool bgate) · 1 unmodified line |
| 4593 | 4549 | |
| 4594 | 4550 | static void vega10_power_gate_uvd(struct pp_hwmgr *hwmgr, bool bgate) |
| 4595 | 4551 | { |
| 4596 | | − struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); |
| 4552 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 4597 | 4553 | |
| 4598 | 4554 | data->uvd_power_gated = bgate; |
| 4599 | 4555 | vega10_enable_disable_uvd_dpm(hwmgr, !bgate); |
| @@ -4646,7 +4602,7 @@ static int vega10_check_states_equal(struct pp_hwmgr *hwmgr, · 46 unmodified lines |
| 4646 | 4602 | static bool |
| 4647 | 4603 | vega10_check_smc_update_required_for_display_configuration(struct pp_hwmgr *hwmgr) |
| 4648 | 4604 | { |
| 4649 | | − struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); |
| 4605 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 4650 | 4606 | bool is_update_required = false; |
| 4651 | 4607 | struct cgs_display_info info = {0, 0, NULL}; |
| 4652 | 4608 | |
| @@ -4704,7 +4660,7 @@ static int vega10_disable_dpm_tasks(struct pp_hwmgr *hwmgr) · 51 unmodified lines |
| 4704 | 4660 | |
| 4705 | 4661 | static int vega10_power_off_asic(struct pp_hwmgr *hwmgr) |
| 4706 | 4662 | { |
| 4707 | | − struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); |
| 4663 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 4708 | 4664 | int result; |
| 4709 | 4665 | |
| 4710 | 4666 | result = vega10_disable_dpm_tasks(hwmgr); |
| @@ -4718,7 +4674,7 @@ static int vega10_power_off_asic(struct pp_hwmgr *hwmgr) · 7 unmodified lines |
| 4718 | 4674 | |
| 4719 | 4675 | static int vega10_get_sclk_od(struct pp_hwmgr *hwmgr) |
| 4720 | 4676 | { |
| 4721 | | − struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); |
| 4677 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 4722 | 4678 | struct vega10_single_dpm_table *sclk_table = &(data->dpm_table.gfx_table); |
| 4723 | 4679 | struct vega10_single_dpm_table *golden_sclk_table = |
| 4724 | 4680 | &(data->golden_dpm_table.gfx_table); |
| @@ -4736,7 +4692,7 @@ static int vega10_get_sclk_od(struct pp_hwmgr *hwmgr) · 11 unmodified lines |
| 4736 | 4692 | |
| 4737 | 4693 | static int vega10_set_sclk_od(struct pp_hwmgr *hwmgr, uint32_t value) |
| 4738 | 4694 | { |
| 4739 | | − struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); |
| 4695 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 4740 | 4696 | struct vega10_single_dpm_table *golden_sclk_table = |
| 4741 | 4697 | &(data->golden_dpm_table.gfx_table); |
| 4742 | 4698 | struct pp_power_state *ps; |
| @@ -4769,7 +4725,7 @@ static int vega10_set_sclk_od(struct pp_hwmgr *hwmgr, uint32_t value) · 26 unmodified lines |
| 4769 | 4725 | |
| 4770 | 4726 | static int vega10_get_mclk_od(struct pp_hwmgr *hwmgr) |
| 4771 | 4727 | { |
| 4772 | | − struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); |
| 4728 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 4773 | 4729 | struct vega10_single_dpm_table *mclk_table = &(data->dpm_table.mem_table); |
| 4774 | 4730 | struct vega10_single_dpm_table *golden_mclk_table = |
| 4775 | 4731 | &(data->golden_dpm_table.mem_table); |
| @@ -4788,7 +4744,7 @@ static int vega10_get_mclk_od(struct pp_hwmgr *hwmgr) · 12 unmodified lines |
| 4788 | 4744 | |
| 4789 | 4745 | static int vega10_set_mclk_od(struct pp_hwmgr *hwmgr, uint32_t value) |
| 4790 | 4746 | { |
| 4791 | | − struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); |
| 4747 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 4792 | 4748 | struct vega10_single_dpm_table *golden_mclk_table = |
| 4793 | 4749 | &(data->golden_dpm_table.mem_table); |
| 4794 | 4750 | struct pp_power_state *ps; |
| @@ -4894,7 +4850,7 @@ static int vega10_register_thermal_interrupt(struct pp_hwmgr *hwmgr, · 99 unmodified lines |
| 4894 | 4850 | |
| 4895 | 4851 | static int vega10_get_power_profile_mode(struct pp_hwmgr *hwmgr, char *buf) |
| 4896 | 4852 | { |
| 4897 | | − struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); |
| 4853 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 4898 | 4854 | uint32_t i, size = 0; |
| 4899 | 4855 | static const uint8_t profile_mode_setting[5][4] = {{70, 60, 1, 3,}, |
| 4900 | 4856 | {90, 60, 0, 0,}, |
| @@ -4935,7 +4891,7 @@ static int vega10_get_power_profile_mode(struct pp_hwmgr *hwmgr, char *buf) · 34 unmodified lines |
| 4935 | 4891 | |
| 4936 | 4892 | static int vega10_set_power_profile_mode(struct pp_hwmgr *hwmgr, long *input, uint32_t size) |
| 4937 | 4893 | { |
| 4938 | | − struct vega10_hwmgr *data = (struct vega10_hwmgr *)(hwmgr->backend); |
| 4894 | + struct vega10_hwmgr *data = hwmgr->backend; |
| 4939 | 4895 | uint8_t busy_set_point; |
| 4940 | 4896 | uint8_t FPS; |
| 4941 | 4897 | uint8_t use_rlc_busy; |