Missing profile index and columnar data format on pp_power_profile_mode for RX 7600
Hi.
I've got a report on corectrl about missing power profile selector for RX 7600 and while looking at it I've found an issue in the current driver implementation (plus an annoyance).
According to the kernel documentation for pp_power_profile_mode:
Writing the number of a predefined profile to pp_power_profile_mode will enable those heuristics.
However, each profile number (or profile index) is missing from pp_power_profile_mode
:
BOOTUP_DEFAULT* 3D_FULL_SCREEN POWER_SAVING VIDEO VR COMPUTE CUSTOM WINDOW_3D
Gfx_ActiveHystLimit 0 0 0 0 0 0 0 0
Gfx_IdleHystLimit 0 2 0 0 1 1 0 2
Gfx_FPS 0 0 0 0 0 0 0 0
Gfx_MinActiveFreqType 1 1 1 1 4 4 1 1
Gfx_BoosterFreqType 4 4 3 4 1 1 4 4
Gfx_MinActiveFreq 0 0 0 0 1000 1000 0 0
Gfx_BoosterFreq 800 650 0 0 0 0 800 650
Fclk_ActiveHystLimit 0 0 0 0 0 0 0 0
Fclk_IdleHystLimit 0 0 0 0 0 0 0 0
Fclk_FPS 0 0 0 0 0 0 0 0
Fclk_MinActiveFreqType 3 1 1 1 1 1 3 3
Fclk_BoosterFreqType 1 1 1 1 1 1 1 1
Fclk_MinActiveFreq 0 0 0 0 0 0 0 0
Fclk_BoosterFreq 0 0 0 0 0 0 0 0
How could a user switch between profiles by writing the desired profile index to pp_power_profile_mode
when no profile indexes are provided at all?
Note that we cannot assume that each profile has an incremental profile index starting at 0 (computed as column number minus 1). There have been examples in the past where the indexes were not consecutive, such as this one from a Cezanne GPU.
Please, add the missing profile indexes to the data.
Additionally, the profile data has been changed to columnar format, diverging from the format used on other GPU models. For example, this is pp_power_profile_mode
data on a RX 480:
NUM MODE_NAME SCLK_UP_HYST SCLK_DOWN_HYST SCLK_ACTIVE_LEVEL MCLK_UP_HYST MCLK_DOWN_HYST MCLK_ACTIVE_LEVEL
0 BOOTUP_DEFAULT: - - - - - -
1 3D_FULL_SCREEN *: 0 100 30 10 60 25
2 POWER_SAVING: 10 0 30 - - -
3 VIDEO: - - - 10 16 31
4 VR: 0 11 50 0 100 10
5 COMPUTE: 0 5 30 - - -
6 CUSTOM: - - - - - -
I'm assuming that the data format was changed for a good technical reason. Otherwise, wouldn't it be better to just use the same data format as the other GPU models? This would ensure consistency and avoid the introduction of yet another data format for third party applications to parse.