diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2018-01-10 05:42:36 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-02-19 14:17:52 -0500 |
commit | 37c5c4dbf03b167b5ca68d4bbc7fb6c92a463fb4 (patch) | |
tree | f6f3e9bc026333a533d078b9dbc508fdbee84468 /drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h | |
parent | e8ea1b9aa0f34b32764582bd4214d70ecb1b53eb (diff) |
drm/amdgpu: add custom power policy support in sysfs
when cat pp_power_profile_mode on Vega10
NUM MODE_NAME BUSY_SET_POINT FPS USE_RLC_BUSY MIN_ACTIVE_LEVEL
0 3D_FULL_SCREEN : 70 60 1 3
1 POWER_SAVING : 90 60 0 0
2 VIDEO*: 70 60 0 0
3 VR : 70 90 0 0
4 COMPUTER : 30 60 0 6
5 CUSTOM : 0 0 0 0
the result show all the profile mode we can support and custom mode.
user can echo the num(0-4) to pp_power_profile_mode to select the profile
mode or can echo "5 value value value value" to enter CUSTOM mode.
the four parameter is set_point/FPS/USER_RLC_BUSY/MIN_ACTIVE_LEVEL.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h index 8a8d09dd8750..986f1d568758 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h | |||
@@ -366,6 +366,14 @@ enum amdgpu_pcie_gen { | |||
366 | (adev)->powerplay.pp_handle, virtual_addr_low, \ | 366 | (adev)->powerplay.pp_handle, virtual_addr_low, \ |
367 | virtual_addr_hi, mc_addr_low, mc_addr_hi, size) | 367 | virtual_addr_hi, mc_addr_low, mc_addr_hi, size) |
368 | 368 | ||
369 | #define amdgpu_dpm_get_power_profile_mode(adev, buf) \ | ||
370 | ((adev)->powerplay.pp_funcs->get_power_profile_mode(\ | ||
371 | (adev)->powerplay.pp_handle, buf)) | ||
372 | |||
373 | #define amdgpu_dpm_set_power_profile_mode(adev, parameter, size) \ | ||
374 | ((adev)->powerplay.pp_funcs->set_power_profile_mode(\ | ||
375 | (adev)->powerplay.pp_handle, parameter, size)) | ||
376 | |||
369 | struct amdgpu_dpm { | 377 | struct amdgpu_dpm { |
370 | struct amdgpu_ps *ps; | 378 | struct amdgpu_ps *ps; |
371 | /* number of valid power states */ | 379 | /* number of valid power states */ |