• Eric Huang's avatar
    drm/amd/amdgpu: add power profile sysfs entry · 34bb2734
    Eric Huang authored
    Add the sysfs entries pp_gfx_power_profile and
    pp_compute_power_profile which give user a way to set
    power profile through parameters minimum sclk, minimum mclk,
    activity threshold, up hysteresis and down hysteresis only
    when the entry power_dpm_force_performance_level is in
    default value "auto". It is read and write. Example:
    
    echo 500 800 20 0 5 > /sys/class/drm/card0/device/pp_*_power_profile
    
    cat /sys/class/drm/card0/device/pp_*_power_profile
    500 800 20 0 5
    
    Note: first parameter is sclk in MHz, second is mclk in MHz,
    third is activity threshold in percentage, fourth is up hysteresis
    in ms and fifth is down hysteresis in ms.
    
    echo set > /sys/class/drm/card0/device/pp_*_power_profile
    To set power profile state if it exists.
    
    echo reset > /sys/class/drm/card0/device/pp_*_power_profile
    To restore default state and clear previous setting.
    Signed-off-by: default avatarEric Huang <JinHuiEric.Huang@amd.com>
    Acked-by: default avatarRex Zhu <Rex.Zhu@amd.com>
    Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    34bb2734
amd_powerplay.h 12.6 KB