@@ -1329,9 +1329,17 @@ static int smu_v13_0_7_populate_umd_state_clk(struct smu_context *smu)
13291329 & dpm_context -> dpm_tables .fclk_table ;
13301330 struct smu_umd_pstate_table * pstate_table =
13311331 & smu -> pstate_table ;
1332+ struct smu_table_context * table_context = & smu -> smu_table ;
1333+ PPTable_t * pptable = table_context -> driver_pptable ;
1334+ DriverReportedClocks_t driver_clocks =
1335+ pptable -> SkuTable .DriverReportedClocks ;
13321336
13331337 pstate_table -> gfxclk_pstate .min = gfx_table -> min ;
1334- pstate_table -> gfxclk_pstate .peak = gfx_table -> max ;
1338+ if (driver_clocks .GameClockAc &&
1339+ (driver_clocks .GameClockAc < gfx_table -> max ))
1340+ pstate_table -> gfxclk_pstate .peak = driver_clocks .GameClockAc ;
1341+ else
1342+ pstate_table -> gfxclk_pstate .peak = gfx_table -> max ;
13351343
13361344 pstate_table -> uclk_pstate .min = mem_table -> min ;
13371345 pstate_table -> uclk_pstate .peak = mem_table -> max ;
@@ -1348,12 +1356,12 @@ static int smu_v13_0_7_populate_umd_state_clk(struct smu_context *smu)
13481356 pstate_table -> fclk_pstate .min = fclk_table -> min ;
13491357 pstate_table -> fclk_pstate .peak = fclk_table -> max ;
13501358
1351- /*
1352- * For now, just use the mininum clock frequency.
1353- * TODO: update them when the real pstate settings available
1354- */
1355- pstate_table -> gfxclk_pstate .standard = gfx_table -> min ;
1356- pstate_table -> uclk_pstate .standard = mem_table -> min ;
1359+ if ( driver_clocks . BaseClockAc &&
1360+ driver_clocks . BaseClockAc < gfx_table -> max )
1361+ pstate_table -> gfxclk_pstate . standard = driver_clocks . BaseClockAc ;
1362+ else
1363+ pstate_table -> gfxclk_pstate .standard = gfx_table -> max ;
1364+ pstate_table -> uclk_pstate .standard = mem_table -> max ;
13571365 pstate_table -> socclk_pstate .standard = soc_table -> min ;
13581366 pstate_table -> vclk_pstate .standard = vclk_table -> min ;
13591367 pstate_table -> dclk_pstate .standard = dclk_table -> min ;
0 commit comments