• Rex Zhu's avatar
    drm/amd/pp: Implement get/set_power_profile_mode on smu7 · 5d24af84
    Rex Zhu authored
    It show what parameters can be configured to tune
    the behavior of natural dpm for perf/watt on smu7.
    
    user can select the mode per workload, but even the default per
    workload settings are not bulletproof.
    
    user can configure custom settings per different use case
    for better perf or better perf/watt.
    
    cat pp_power_profile_mode
    NUM        MODE_NAME     SCLK_UP_HYST   SCLK_DOWN_HYST SCLK_ACTIVE_LEVEL     MCLK_UP_HYST   MCLK_DOWN_HYST MCLK_ACTIVE_LEVEL
      0   3D_FULL_SCREEN:        0              100               30                0              100               10
      1     POWER_SAVING:       10                0               30                -                -                -
      2            VIDEO:        -                -                -               10               16               31
      3               VR:        0               11               50                0              100               10
      4          COMPUTE:        0                5               30                -                -                -
      5           CUSTOM:        0                0                0                0                0                0
      *          CURRENT:        0              100               30                0              100               10
    
    Under manual dpm level,
    
    user can echo "0/1/2/3/4">pp_power_profile_mode
    to select 3D_FULL_SCREEN/POWER_SAVING/VIDEO/VR/COMPUTE
    mode.
    
    echo "5 * * * * * * * *">pp_power_profile_mode
    to set custom settings.
    "5 * * * * * * * *" mean "CUSTOM enable_sclk SCLK_UP_HYST
    SCLK_DOWN_HYST SCLK_ACTIVE_LEVEL enable_mclk MCLK_UP_HYST
    MCLK_DOWN_HYST MCLK_ACTIVE_LEVEL"
    
    if the parameter enable_sclk/enable_mclk is true,
    driver will update the following parameters to dpm table.
    if false, ignore the following parameters.
    Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    Signed-off-by: default avatarRex Zhu <Rex.Zhu@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    5d24af84
smu7_hwmgr.c 166 KB