amdgpu/pm: Powerplay API for smu , updates to some pm functions
authorDarren Powell <darren.powell@amd.com>
Tue, 8 Dec 2020 00:20:01 +0000 (19:20 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 26 Feb 2021 22:19:14 +0000 (17:19 -0500)
commit8f4828d0a104d961d5eb850d0aef1530fc24e370
tree021494530516c3c59cd191cbb12a858fd4297f85
parentbc7d6c12054dcd3d652bf3f62eacab3b6e121f06
amdgpu/pm: Powerplay API for smu , updates to some pm functions

v3: updated to include new clocks od_vddgfx_offset, od_cclk
    Context mismatch with revision v3 to patch 0003

Modified Functions
  smu_sys_set_pp_table()        - modifed signature to match Powerplay API set_pp_table
  smu_force_performance_level() - modifed arg0 to match Powerplay API force_performance_level
  smu_od_edit_dpm_table()       - modifed arg0 to match Powerplay API odn_edit_dpm_table

Other Changes
  smu_od_edit_dpm_table()       - removed call to task(READJUST_POWER_STATE) after COMMIT_TABLE,
                                  now handled in calling function
  amdgpu_set_power_dpm_force_performance_level() - now checks thermal for swsmu systems before trying to change level
  amdgpu_set_pp_od_clk_voltage() - now attempts to set fine_grain_clock_vol before swsmu edit dpm table

Signed-off-by: Darren Powell <darren.powell@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/amdgpu_pm.c
drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c