Lines Matching refs:dpm_table

716 	struct vega20_dpm_table *dpm_table = NULL;  in vega20_set_default_dpm_table()  local
719 dpm_table = smu_dpm->dpm_context; in vega20_set_default_dpm_table()
722 single_dpm_table = &(dpm_table->soc_table); in vega20_set_default_dpm_table()
738 single_dpm_table = &(dpm_table->gfx_table); in vega20_set_default_dpm_table()
754 single_dpm_table = &(dpm_table->mem_table); in vega20_set_default_dpm_table()
770 single_dpm_table = &(dpm_table->eclk_table); in vega20_set_default_dpm_table()
785 single_dpm_table = &(dpm_table->vclk_table); in vega20_set_default_dpm_table()
800 single_dpm_table = &(dpm_table->dclk_table); in vega20_set_default_dpm_table()
815 single_dpm_table = &(dpm_table->dcef_table); in vega20_set_default_dpm_table()
831 single_dpm_table = &(dpm_table->pixel_table); in vega20_set_default_dpm_table()
846 single_dpm_table = &(dpm_table->display_table); in vega20_set_default_dpm_table()
861 single_dpm_table = &(dpm_table->phy_table); in vega20_set_default_dpm_table()
876 single_dpm_table = &(dpm_table->fclk_table); in vega20_set_default_dpm_table()
890 memcpy(smu_dpm->golden_dpm_context, dpm_table, in vega20_set_default_dpm_table()
899 struct vega20_dpm_table *dpm_table = NULL; in vega20_populate_umd_state_clk() local
903 dpm_table = smu_dpm->dpm_context; in vega20_populate_umd_state_clk()
904 gfx_table = &(dpm_table->gfx_table); in vega20_populate_umd_state_clk()
905 mem_table = &(dpm_table->mem_table); in vega20_populate_umd_state_clk()
924 struct vega20_single_dpm_table *dpm_table) in vega20_get_clk_table() argument
928 count = (dpm_table->count > MAX_NUM_CLOCKS) ? MAX_NUM_CLOCKS : dpm_table->count; in vega20_get_clk_table()
933 dpm_table->dpm_levels[i].value * 1000; in vega20_get_clk_table()
951 struct vega20_dpm_table *dpm_table = NULL; in vega20_print_clk_levels() local
958 dpm_table = smu_dpm->dpm_context; in vega20_print_clk_levels()
968 single_dpm_table = &(dpm_table->gfx_table); in vega20_print_clk_levels()
989 single_dpm_table = &(dpm_table->mem_table); in vega20_print_clk_levels()
1010 single_dpm_table = &(dpm_table->soc_table); in vega20_print_clk_levels()
1031 single_dpm_table = &(dpm_table->fclk_table); in vega20_print_clk_levels()
1046 single_dpm_table = &(dpm_table->dcef_table); in vega20_print_clk_levels()
1137 single_dpm_table = &(dpm_table->mem_table); in vega20_print_clk_levels()
1186 struct vega20_dpm_table *dpm_table; in vega20_upload_dpm_level() local
1191 dpm_table = smu->smu_dpm.dpm_context; in vega20_upload_dpm_level()
1195 single_dpm_table = &(dpm_table->gfx_table); in vega20_upload_dpm_level()
1210 single_dpm_table = &(dpm_table->mem_table); in vega20_upload_dpm_level()
1225 single_dpm_table = &(dpm_table->soc_table); in vega20_upload_dpm_level()
1240 single_dpm_table = &(dpm_table->fclk_table); in vega20_upload_dpm_level()
1255 single_dpm_table = &(dpm_table->dcef_table); in vega20_upload_dpm_level()
1274 struct vega20_dpm_table *dpm_table; in vega20_force_clk_levels() local
1290 dpm_table = smu->smu_dpm.dpm_context; in vega20_force_clk_levels()
1294 single_dpm_table = &(dpm_table->gfx_table); in vega20_force_clk_levels()
1321 single_dpm_table = &(dpm_table->mem_table); in vega20_force_clk_levels()
1348 single_dpm_table = &(dpm_table->soc_table); in vega20_force_clk_levels()
1375 single_dpm_table = &(dpm_table->fclk_table); in vega20_force_clk_levels()
1403 single_dpm_table = &(dpm_table->dcef_table); in vega20_force_clk_levels()
1450 struct vega20_dpm_table *dpm_table = NULL; in vega20_get_clock_by_type_with_latency() local
1452 dpm_table = smu_dpm->dpm_context; in vega20_get_clock_by_type_with_latency()
1458 single_dpm_table = &(dpm_table->gfx_table); in vega20_get_clock_by_type_with_latency()
1462 single_dpm_table = &(dpm_table->mem_table); in vega20_get_clock_by_type_with_latency()
1466 single_dpm_table = &(dpm_table->dcef_table); in vega20_get_clock_by_type_with_latency()
1470 single_dpm_table = &(dpm_table->soc_table); in vega20_get_clock_by_type_with_latency()
1750 struct vega20_dpm_table *dpm_table = NULL; in vega20_get_od_percentage() local
1756 dpm_table = smu_dpm->dpm_context; in vega20_get_od_percentage()
1761 single_dpm_table = &(dpm_table->gfx_table); in vega20_get_od_percentage()
1765 single_dpm_table = &(dpm_table->mem_table); in vega20_get_od_percentage()
1989 struct vega20_dpm_table *dpm_table = (struct vega20_dpm_table *)smu->smu_dpm.dpm_context; in vega20_get_profiling_clk_mask() local
1997 gfx_dpm_table = &dpm_table->gfx_table; in vega20_get_profiling_clk_mask()
1998 mem_dpm_table = &dpm_table->mem_table; in vega20_get_profiling_clk_mask()
1999 soc_dpm_table = &dpm_table->soc_table; in vega20_get_profiling_clk_mask()
2028 struct vega20_single_dpm_table *dpm_table) in vega20_set_uclk_to_highest_dpm_level() argument
2036 if (dpm_table->count <= 0) { in vega20_set_uclk_to_highest_dpm_level()
2041 if (dpm_table->count > NUM_UCLK_DPM_LEVELS) { in vega20_set_uclk_to_highest_dpm_level()
2046 dpm_table->dpm_state.hard_min_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_set_uclk_to_highest_dpm_level()
2049 (PPCLK_UCLK << 16) | dpm_table->dpm_state.hard_min_level); in vega20_set_uclk_to_highest_dpm_level()
2062 struct vega20_dpm_table *dpm_table = smu->smu_dpm.dpm_context; in vega20_pre_display_config_changed() local
2069 &dpm_table->mem_table); in vega20_pre_display_config_changed()
2104 struct vega20_single_dpm_table *dpm_table; in vega20_apply_clocks_adjust_rules() local
2114 dpm_table = &(dpm_ctx->gfx_table); in vega20_apply_clocks_adjust_rules()
2115 dpm_table->dpm_state.soft_min_level = dpm_table->dpm_levels[0].value; in vega20_apply_clocks_adjust_rules()
2116 dpm_table->dpm_state.soft_max_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_apply_clocks_adjust_rules()
2117 dpm_table->dpm_state.hard_min_level = dpm_table->dpm_levels[0].value; in vega20_apply_clocks_adjust_rules()
2118 dpm_table->dpm_state.hard_max_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_apply_clocks_adjust_rules()
2120 if (VEGA20_UMD_PSTATE_GFXCLK_LEVEL < dpm_table->count) { in vega20_apply_clocks_adjust_rules()
2121dpm_table->dpm_state.soft_min_level = dpm_table->dpm_levels[VEGA20_UMD_PSTATE_GFXCLK_LEVEL].value; in vega20_apply_clocks_adjust_rules()
2122dpm_table->dpm_state.soft_max_level = dpm_table->dpm_levels[VEGA20_UMD_PSTATE_GFXCLK_LEVEL].value; in vega20_apply_clocks_adjust_rules()
2126 dpm_table->dpm_state.soft_min_level = dpm_table->dpm_levels[0].value; in vega20_apply_clocks_adjust_rules()
2127 dpm_table->dpm_state.soft_max_level = dpm_table->dpm_levels[0].value; in vega20_apply_clocks_adjust_rules()
2131 dpm_table->dpm_state.soft_min_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_apply_clocks_adjust_rules()
2132 dpm_table->dpm_state.soft_max_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_apply_clocks_adjust_rules()
2136 dpm_table = &(dpm_ctx->mem_table); in vega20_apply_clocks_adjust_rules()
2137 dpm_table->dpm_state.soft_min_level = dpm_table->dpm_levels[0].value; in vega20_apply_clocks_adjust_rules()
2138 dpm_table->dpm_state.soft_max_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_apply_clocks_adjust_rules()
2139 dpm_table->dpm_state.hard_min_level = dpm_table->dpm_levels[0].value; in vega20_apply_clocks_adjust_rules()
2140 dpm_table->dpm_state.hard_max_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_apply_clocks_adjust_rules()
2142 if (VEGA20_UMD_PSTATE_MCLK_LEVEL < dpm_table->count) { in vega20_apply_clocks_adjust_rules()
2143 dpm_table->dpm_state.soft_min_level = dpm_table->dpm_levels[VEGA20_UMD_PSTATE_MCLK_LEVEL].value; in vega20_apply_clocks_adjust_rules()
2144 dpm_table->dpm_state.soft_max_level = dpm_table->dpm_levels[VEGA20_UMD_PSTATE_MCLK_LEVEL].value; in vega20_apply_clocks_adjust_rules()
2148 dpm_table->dpm_state.soft_min_level = dpm_table->dpm_levels[0].value; in vega20_apply_clocks_adjust_rules()
2149 dpm_table->dpm_state.soft_max_level = dpm_table->dpm_levels[0].value; in vega20_apply_clocks_adjust_rules()
2153 dpm_table->dpm_state.soft_min_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_apply_clocks_adjust_rules()
2154 dpm_table->dpm_state.soft_max_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_apply_clocks_adjust_rules()
2158 if (dpm_table->dpm_state.hard_min_level < (smu->display_config->min_mem_set_clock / 100)) in vega20_apply_clocks_adjust_rules()
2159 dpm_table->dpm_state.hard_min_level = smu->display_config->min_mem_set_clock / 100; in vega20_apply_clocks_adjust_rules()
2163 dpm_table->dpm_state.hard_min_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_apply_clocks_adjust_rules()
2166 if (dpm_table->dpm_levels[i].value >= (smu->display_config->min_mem_set_clock / 100)) { in vega20_apply_clocks_adjust_rules()
2167 dpm_table->dpm_state.hard_min_level = dpm_table->dpm_levels[i].value; in vega20_apply_clocks_adjust_rules()
2175 dpm_table->dpm_state.hard_min_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_apply_clocks_adjust_rules()
2178 dpm_table = &(dpm_ctx->vclk_table); in vega20_apply_clocks_adjust_rules()
2179 dpm_table->dpm_state.soft_min_level = dpm_table->dpm_levels[0].value; in vega20_apply_clocks_adjust_rules()
2180 dpm_table->dpm_state.soft_max_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_apply_clocks_adjust_rules()
2181 dpm_table->dpm_state.hard_min_level = dpm_table->dpm_levels[0].value; in vega20_apply_clocks_adjust_rules()
2182 dpm_table->dpm_state.hard_max_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_apply_clocks_adjust_rules()
2184 if (VEGA20_UMD_PSTATE_UVDCLK_LEVEL < dpm_table->count) { in vega20_apply_clocks_adjust_rules()
2185dpm_table->dpm_state.soft_min_level = dpm_table->dpm_levels[VEGA20_UMD_PSTATE_UVDCLK_LEVEL].value; in vega20_apply_clocks_adjust_rules()
2186dpm_table->dpm_state.soft_max_level = dpm_table->dpm_levels[VEGA20_UMD_PSTATE_UVDCLK_LEVEL].value; in vega20_apply_clocks_adjust_rules()
2190 dpm_table->dpm_state.soft_min_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_apply_clocks_adjust_rules()
2191 dpm_table->dpm_state.soft_max_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_apply_clocks_adjust_rules()
2195 dpm_table = &(dpm_ctx->dclk_table); in vega20_apply_clocks_adjust_rules()
2196 dpm_table->dpm_state.soft_min_level = dpm_table->dpm_levels[0].value; in vega20_apply_clocks_adjust_rules()
2197 dpm_table->dpm_state.soft_max_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_apply_clocks_adjust_rules()
2198 dpm_table->dpm_state.hard_min_level = dpm_table->dpm_levels[0].value; in vega20_apply_clocks_adjust_rules()
2199 dpm_table->dpm_state.hard_max_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_apply_clocks_adjust_rules()
2201 if (VEGA20_UMD_PSTATE_UVDCLK_LEVEL < dpm_table->count) { in vega20_apply_clocks_adjust_rules()
2202dpm_table->dpm_state.soft_min_level = dpm_table->dpm_levels[VEGA20_UMD_PSTATE_UVDCLK_LEVEL].value; in vega20_apply_clocks_adjust_rules()
2203dpm_table->dpm_state.soft_max_level = dpm_table->dpm_levels[VEGA20_UMD_PSTATE_UVDCLK_LEVEL].value; in vega20_apply_clocks_adjust_rules()
2207 dpm_table->dpm_state.soft_min_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_apply_clocks_adjust_rules()
2208 dpm_table->dpm_state.soft_max_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_apply_clocks_adjust_rules()
2212 dpm_table = &(dpm_ctx->soc_table); in vega20_apply_clocks_adjust_rules()
2213 dpm_table->dpm_state.soft_min_level = dpm_table->dpm_levels[0].value; in vega20_apply_clocks_adjust_rules()
2214 dpm_table->dpm_state.soft_max_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_apply_clocks_adjust_rules()
2215 dpm_table->dpm_state.hard_min_level = dpm_table->dpm_levels[0].value; in vega20_apply_clocks_adjust_rules()
2216 dpm_table->dpm_state.hard_max_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_apply_clocks_adjust_rules()
2218 if (VEGA20_UMD_PSTATE_SOCCLK_LEVEL < dpm_table->count) { in vega20_apply_clocks_adjust_rules()
2219dpm_table->dpm_state.soft_min_level = dpm_table->dpm_levels[VEGA20_UMD_PSTATE_SOCCLK_LEVEL].value; in vega20_apply_clocks_adjust_rules()
2220dpm_table->dpm_state.soft_max_level = dpm_table->dpm_levels[VEGA20_UMD_PSTATE_SOCCLK_LEVEL].value; in vega20_apply_clocks_adjust_rules()
2224 dpm_table->dpm_state.soft_min_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_apply_clocks_adjust_rules()
2225 dpm_table->dpm_state.soft_max_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_apply_clocks_adjust_rules()
2229 dpm_table = &(dpm_ctx->eclk_table); in vega20_apply_clocks_adjust_rules()
2230 dpm_table->dpm_state.soft_min_level = dpm_table->dpm_levels[0].value; in vega20_apply_clocks_adjust_rules()
2231 dpm_table->dpm_state.soft_max_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_apply_clocks_adjust_rules()
2232 dpm_table->dpm_state.hard_min_level = dpm_table->dpm_levels[0].value; in vega20_apply_clocks_adjust_rules()
2233 dpm_table->dpm_state.hard_max_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_apply_clocks_adjust_rules()
2235 if (VEGA20_UMD_PSTATE_VCEMCLK_LEVEL < dpm_table->count) { in vega20_apply_clocks_adjust_rules()
2236dpm_table->dpm_state.soft_min_level = dpm_table->dpm_levels[VEGA20_UMD_PSTATE_VCEMCLK_LEVEL].value; in vega20_apply_clocks_adjust_rules()
2237dpm_table->dpm_state.soft_max_level = dpm_table->dpm_levels[VEGA20_UMD_PSTATE_VCEMCLK_LEVEL].value; in vega20_apply_clocks_adjust_rules()
2241 dpm_table->dpm_state.soft_min_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_apply_clocks_adjust_rules()
2242 dpm_table->dpm_state.soft_max_level = dpm_table->dpm_levels[dpm_table->count - 1].value; in vega20_apply_clocks_adjust_rules()
2250 struct vega20_dpm_table *dpm_table = smu->smu_dpm.dpm_context; in vega20_notify_smc_dispaly_config() local
2251 struct vega20_single_dpm_table *memtable = &dpm_table->mem_table; in vega20_notify_smc_dispaly_config()
2341 struct vega20_dpm_table *dpm_table = in vega20_force_dpm_limit_value() local
2345 soft_level = vega20_find_highest_dpm_level(&(dpm_table->gfx_table)); in vega20_force_dpm_limit_value()
2347 soft_level = vega20_find_lowest_dpm_level(&(dpm_table->gfx_table)); in vega20_force_dpm_limit_value()
2349 dpm_table->gfx_table.dpm_state.soft_min_level = in vega20_force_dpm_limit_value()
2350 dpm_table->gfx_table.dpm_state.soft_max_level = in vega20_force_dpm_limit_value()
2351 dpm_table->gfx_table.dpm_levels[soft_level].value; in vega20_force_dpm_limit_value()
2354 soft_level = vega20_find_highest_dpm_level(&(dpm_table->mem_table)); in vega20_force_dpm_limit_value()
2356 soft_level = vega20_find_lowest_dpm_level(&(dpm_table->mem_table)); in vega20_force_dpm_limit_value()
2358 dpm_table->mem_table.dpm_state.soft_min_level = in vega20_force_dpm_limit_value()
2359 dpm_table->mem_table.dpm_state.soft_max_level = in vega20_force_dpm_limit_value()
2360 dpm_table->mem_table.dpm_levels[soft_level].value; in vega20_force_dpm_limit_value()
2363 soft_level = vega20_find_highest_dpm_level(&(dpm_table->soc_table)); in vega20_force_dpm_limit_value()
2365 soft_level = vega20_find_lowest_dpm_level(&(dpm_table->soc_table)); in vega20_force_dpm_limit_value()
2367 dpm_table->soc_table.dpm_state.soft_min_level = in vega20_force_dpm_limit_value()
2368 dpm_table->soc_table.dpm_state.soft_max_level = in vega20_force_dpm_limit_value()
2369 dpm_table->soc_table.dpm_levels[soft_level].value; in vega20_force_dpm_limit_value()
2392 struct vega20_dpm_table *dpm_table = in vega20_unforce_dpm_levels() local
2395 soft_min_level = vega20_find_lowest_dpm_level(&(dpm_table->gfx_table)); in vega20_unforce_dpm_levels()
2396 soft_max_level = vega20_find_highest_dpm_level(&(dpm_table->gfx_table)); in vega20_unforce_dpm_levels()
2397 dpm_table->gfx_table.dpm_state.soft_min_level = in vega20_unforce_dpm_levels()
2398 dpm_table->gfx_table.dpm_levels[soft_min_level].value; in vega20_unforce_dpm_levels()
2399 dpm_table->gfx_table.dpm_state.soft_max_level = in vega20_unforce_dpm_levels()
2400 dpm_table->gfx_table.dpm_levels[soft_max_level].value; in vega20_unforce_dpm_levels()
2402 soft_min_level = vega20_find_lowest_dpm_level(&(dpm_table->mem_table)); in vega20_unforce_dpm_levels()
2403 soft_max_level = vega20_find_highest_dpm_level(&(dpm_table->mem_table)); in vega20_unforce_dpm_levels()
2404 dpm_table->mem_table.dpm_state.soft_min_level = in vega20_unforce_dpm_levels()
2405 dpm_table->gfx_table.dpm_levels[soft_min_level].value; in vega20_unforce_dpm_levels()
2406 dpm_table->mem_table.dpm_state.soft_max_level = in vega20_unforce_dpm_levels()
2407 dpm_table->gfx_table.dpm_levels[soft_max_level].value; in vega20_unforce_dpm_levels()
2409 soft_min_level = vega20_find_lowest_dpm_level(&(dpm_table->soc_table)); in vega20_unforce_dpm_levels()
2410 soft_max_level = vega20_find_highest_dpm_level(&(dpm_table->soc_table)); in vega20_unforce_dpm_levels()
2411 dpm_table->soc_table.dpm_state.soft_min_level = in vega20_unforce_dpm_levels()
2412 dpm_table->soc_table.dpm_levels[soft_min_level].value; in vega20_unforce_dpm_levels()
2413 dpm_table->soc_table.dpm_state.soft_max_level = in vega20_unforce_dpm_levels()
2414 dpm_table->soc_table.dpm_levels[soft_max_level].value; in vega20_unforce_dpm_levels()
2541 struct vega20_dpm_table *dpm_table = NULL; in vega20_set_od_percentage() local
2552 dpm_table = smu_dpm->dpm_context; in vega20_set_od_percentage()
2557 single_dpm_table = &(dpm_table->gfx_table); in vega20_set_od_percentage()
2564 single_dpm_table = &(dpm_table->mem_table); in vega20_set_od_percentage()
2617 struct vega20_dpm_table *dpm_table = NULL; in vega20_odn_edit_dpm_table() local
2626 dpm_table = smu_dpm->dpm_context; in vega20_odn_edit_dpm_table()
2682 single_dpm_table = &(dpm_table->mem_table); in vega20_odn_edit_dpm_table()
2808 single_dpm_table = &(dpm_table->gfx_table); in vega20_odn_edit_dpm_table()