@@ -1329,9 +1329,17 @@ static int smu_v13_0_7_populate_umd_state_clk(struct smu_context *smu)
1329
1329
& dpm_context -> dpm_tables .fclk_table ;
1330
1330
struct smu_umd_pstate_table * pstate_table =
1331
1331
& 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 ;
1332
1336
1333
1337
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 ;
1335
1343
1336
1344
pstate_table -> uclk_pstate .min = mem_table -> min ;
1337
1345
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)
1348
1356
pstate_table -> fclk_pstate .min = fclk_table -> min ;
1349
1357
pstate_table -> fclk_pstate .peak = fclk_table -> max ;
1350
1358
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 ;
1357
1365
pstate_table -> socclk_pstate .standard = soc_table -> min ;
1358
1366
pstate_table -> vclk_pstate .standard = vclk_table -> min ;
1359
1367
pstate_table -> dclk_pstate .standard = dclk_table -> min ;
0 commit comments