1. 10 4月, 2021 5 次提交
  2. 24 3月, 2021 4 次提交
  3. 27 2月, 2021 8 次提交
    • D
      amdgpu/pm: Powerplay API for smu , updates to some pm functions · 8f4828d0
      Darren Powell 提交于
      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: NDarren Powell <darren.powell@amd.com>
      Reviewed-by: NEvan Quan <evan.quan@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      8f4828d0
    • D
      amdgpu/pm: Powerplay API for smu , changed 4 dpm functions to use API · bc7d6c12
      Darren Powell 提交于
      v2: fix errors and warnings flagged by checkpatch
      v3: Context mismatch with revision v3 to patch 0003
      
      New Functions
        smu_get_mclk        - implementation of the Powerplay API function get_mclk
        smu_get_sclk        - implementation of the Powerplay API function get_sclk
        smu_handle_dpm_task - implementation of the Powerplay API function dispatch_tasks
      
      Modified Functions
        smu_dpm_set_power_gate - - modifed arg0 to match Powerplay API set_powergating_by_smu
      
      Other Changes
        removed special smu handling in dpm functions and called through Powerplay API
        call to smu_dpm_set_power_gate via Powerplay API now locks mutex for UVD and VCE
      Signed-off-by: NDarren Powell <darren.powell@amd.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NEvan Quan <evan.quan@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      bc7d6c12
    • D
      amdgpu/pm: Powerplay API for smu , changes to clock and profile mode functions · 2ea092e5
      Darren Powell 提交于
      v3: updated to include new clocks vclk, dclk, od_vddgfx_offset, od_cclk
          Added forward declaration for function smu_force_smuclk_levels to resolve clash with other commits
          Resolved context clashes with other commits and v3 updates to patches 0003, 0004
      v2: fix errors flagged by checkpatch
      
      New Functions
        smu_bump_power_profile_mode() - changes profile mode assuming calling function already has mutex
        smu_force_ppclk_levels()      - accepts Powerplay enum pp_clock_type to specify clock to change
        smu_print_ppclk_levels()      - accepts Powerplay enum pp_clock_type to request clock levels
        amdgpu_get_pp_dpm_clock()     - accepts Powerplay enum pp_clock_type to request clock levels and allows
                                        all the amdgpu_get_pp_dpm_$CLK functions to have a single codepath
        amdgpu_set_pp_dpm_clock()     - accepts Powerplay enum pp_clock_type to set clock levels and allows
                                        all the amdgpu_set_pp_dpm_$CLK functions to have a single codepath
      
      Modified Functions
        smu_force_smuclk_levels        - changed function name to make clear difference to smu_force_ppclk_levels
        smu_force_ppclk_levels()       - modifed signature to implement Powerplay API force_clock_level
                                       - calls smu_force_smuclk_levels
        smu_print_smuclk_levels        - changed function name to make clear difference to smu_print_ppclk_levels
        smu_print_ppclk_levels()       - modifed signature to implement Powerplay API force_clock_level
                                       - calls smu_print_smuclk_levels
        smu_sys_get_gpu_metrics        - modifed arg0 to match Powerplay API get_gpu_metrics
        smu_get_power_profile_mode     - modifed arg0 to match Powerplay API get_power_profile_mode
        smu_set_power_profile_mode     - modifed arg0 to match Powerplay API set_power_profile_mode
                                       - removed arg lock_needed, mutex always locked, internal functions
                                         can call smu_bump if they already hold lock
        smu_switch_power_profile       - now calls smu_bump as already holds mutex lock
        smu_adjust_power_state_dynamic - now calls smu_bump as already holds mutex lock
        amdgpu_get_pp_od_clk_voltage   - uses smu_print_ppclk_levels
        amdgpu_{set,get}_pp_dpm_$CLK   - replace logic with call helper function amdgpu_{set,get}_pp_dpm_clock()
                                         CLK ={sclk, mclk, socclk, fclk, dcefclk, pci, vclkd, dclk}
      
      Other Changes
        added 5 smu Powerplay functions to swsmu_dpm_funcs
        removed special smu handling in pm functions and called through Powerplay API
      Signed-off-by: NDarren Powell <darren.powell@amd.com>
      Reviewed-by: NEvan Quan <evan.quan@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      2ea092e5
    • D
      amdgpu/pm: Powerplay API for smu , changed 5 dpm powergating & sensor functions to use API · 9ab5001a
      Darren Powell 提交于
      v2: add comment to highlight assignment that changes uint32_t value to int
          fix errors flagged by checkpatch.pl
      
      New Functions
        smu_get_baco_capability() - Implement Powerplay API get_asic_baco_capability
        smu_baco_set_state()      - Implement Powerplay API set_asic_baco_state
      
      Modified Functions
        smu_read_sensor() - modifed signature to match Powerplay API read_sensor
      
      Other Changes
        added 3 above smu Powerplay functions to swsmu_dpm_funcs
        removed special smu handling in 5 dpm functions and called through Powerplay API
      Signed-off-by: NDarren Powell <darren.powell@amd.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NEvan Quan <evan.quan@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      9ab5001a
    • D
      amdgpu/pm: Powerplay API for smu , changed 9 pm power functions to use API · 8dfc8c53
      Darren Powell 提交于
      v2: remove check for error during swsmu amdgpu_dpm_get_pp_num_states() call to match previous powerplay behaviour
      v3: removed smu implementation of powerplay get_power_limit
          Resolved context clashes with other commits
      
      Modified Files
        smu_set_power_limit()         - modifed arg0 to match Powerplay API set_power_limit
        smu_sys_get_pp_table()        - modifed signature to match Powerplay API get_pp_table
        smu_get_power_num_states()    - modifed arg0 to match Powerplay API get_pp_num_states
        smu_get_current_power_state() - modifed arg0 to match Powerplay API get_current_power_state
        smu_sys_get_pp_feature_mask() - modifed signature to match Powerplay API get_ppfeature_status
        smu_sys_set_pp_feature_mask() - modifed arg0 to match Powerplay API set_ppfeature_status
      
      Other Changes
        added 6 above smu Powerplay functions to swsmu_dpm_funcs
        removed special smu handling of above functions and called through Powerplay API
      Signed-off-by: NDarren Powell <darren.powell@amd.com>
      Reviewed-by: NEvan Quan <evan.quan@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      8dfc8c53
    • D
      amdgpu/pm: Powerplay API for smu , changed 6 pm hwmon fan functions to use API · f46587bc
      Darren Powell 提交于
      v2: changed error return value of smu_get_fan_control_mode to AMD_FAN_CTRL_NONE
          fixed type in amdgpu_hwmon_get_pwm1_enable() print statement
          fixed indent flagged by checkpatch.pl
      
      Modified Functions
        smu_set_fan_speed_rpm()     - modifed arg0 to match Powerplay API set_fan_speed_rpm
        smu_get_fan_control_mode()  - modifed signature to match Powerplay API get_fan_control_mode
        smu_set_fan_control_mode()  - modifed signature to match Powerplay API set_fan_control_mode
        smu_get_fan_speed_percent() - modifed signature to match Powerplay API get_fan_speed_percent
        smu_set_fan_speed_percent() - modifed signature to match Powerplay API set_fan_speed_percent
        smu_get_fan_speed_rpm()     - modifed arg0 to match Powerplay API get_fan_speed_rpm
      
      Other Changes
        added 6 above smu fan Powerplay functions to swsmu_dpm_funcs
        removed special smu handling of above functions and called through Powerplay API
      Signed-off-by: NDarren Powell <darren.powell@amd.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NEvan Quan <evan.quan@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      f46587bc
    • D
      amdgpu/pm: Powerplay API for smu , changed 6 dpm reset functions to use API · bab0f602
      Darren Powell 提交于
      Modified Functions
        smu_set_xgmi_pstate()       - modifed arg0 to match Powerplay API set_xgmi_pstate
        smu_mode2_reset()           - modifed arg0 to match Powerplay API asic_reset_mode_2
        smu_switch_power_profile()  - modifed arg0 to match Powerplay API switch_power_profile
        smu_set_mp1_state()         - modifed arg0 to match Powerplay API set_mp1_state
        smu_set_df_cstate()         - modifed arg0 to match Powerplay API set_df_cstate
        smu_enable_mgpu_fan_boost() - modifed arg0 to match Powerplay API enable_mgpu_fan_boost
      
      Other Changes
        added above smu reset Powerplay functions to swsmu_dpm_funcs
        removed special smu handling of above functions and called through Powerplay API
      Signed-off-by: NDarren Powell <darren.powell@amd.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NEvan Quan <evan.quan@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      bab0f602
    • D
      amdgpu/pm: Powerplay API for smu , added get_performance_level · 4df144f8
      Darren Powell 提交于
      v2: updated the structure name to swsmu_pm_funcs
      
      Modified Functions
        smu_get_performance_level() - modifed arg0 to match Powerplay API get_performance_level
      
      Other Changes
        added a new structure swsmu_dpm_funcs to hold smu functions for Powerplay API
        removed special smu handling from amdgpu_get_power_dpm_force_performance_level
      Signed-off-by: NDarren Powell <darren.powell@amd.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NEvan Quan <evan.quan@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      4df144f8
  4. 19 2月, 2021 1 次提交
  5. 10 2月, 2021 2 次提交
  6. 02 2月, 2021 2 次提交
  7. 29 1月, 2021 1 次提交
  8. 26 1月, 2021 1 次提交
  9. 20 1月, 2021 1 次提交
    • H
      drm/amdgpu: fix build error without x86 kconfig (v2) · 4aef0ebc
      Huang Rui 提交于
      This patch is to fix below build error while we are using the kconfig
      without x86.
      
      drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c: In function
      'vangogh_get_smu_metrics_data':
      drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:300:10:
      error: 'boot_cpu_data' undeclared (first use in this function); did you
      mean 'boot_cpuid'?
        300 |          boot_cpu_data.x86_max_cores * sizeof(uint16_t));
            |          ^~~~~~~~~~~~~
            |          boot_cpuid
      drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c: In function
      'vangogh_read_sensor':
      drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:1320:11:
      error: 'boot_cpu_data' undeclared (first use in this function); did you
      mean 'boot_cpuid'?
       1320 |   *size = boot_cpu_data.x86_max_cores * sizeof(uint16_t);
            |           ^~~~~~~~~~~~~
            |           boot_cpuid
      drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c: In function
      'vangogh_od_edit_dpm_table':
      drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/vangogh_ppt.c:1460:19:
      error: 'boot_cpu_data' undeclared (first use in this function); did you
      mean 'boot_cpuid'?
       1460 |   if (input[0] >= boot_cpu_data.x86_max_cores) {
            |                   ^~~~~~~~~~~~~
            |                   boot_cpuid
      
      v2: fix #ifdef and add comment for APU only
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NHuang Rui <ray.huang@amd.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      4aef0ebc
  10. 15 1月, 2021 1 次提交
    • X
      drm/amd/pm: modify the fine grain tuning function for Renoir · e017fb66
      Xiaojian Du 提交于
      This patch is to modify the fine grain tuning function for Renoir.
      The fine grain tuning function uses the sysfs node -- pp_od_clk_voltage
      to config gfxclk. Meanwhile, another sysfs
      node -- power_dpm_force_perfomance_level also affects the gfx clk.
      It will cause confusion when these two sysfs nodes works
      together.
      It is risky to add two new flags to common smu struct, so
      this patch uses the existing flag to make these two sysfs nodes works
      separately. Only when power_dpm_force_perfomance_level is changed
      to "manual" mode, the fine grain function will be started.
      In other profile modes, including "auto", "high", "low", "profile_peak",
      "profile_standard", "profile_min_sclk", "profile_min_mclk",
      the fine grain tuning function will be shut down and the frequency range
      of gfx will be restored the default value.
      Signed-off-by: NXiaojian Du <Xiaojian.Du@amd.com>
      Reviewed-by: NHuang Rui <ray.huang@amd.com>
      Reviewed-by: NKevin Wang <kevin1.wang@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      e017fb66
  11. 14 1月, 2021 2 次提交
  12. 09 1月, 2021 1 次提交
    • X
      drm/amd/pm: modify the fine grain tuning function for Renoir · 08da4fcd
      Xiaojian Du 提交于
      This patch is to improve the fine grain tuning function for Renoir.
      The fine grain tuning function uses the sysfs node -- pp_od_clk_voltage
      to config gfxclk. Meanwhile, another sysfs
      node -- power_dpm_force_perfomance_level also affects the gfx clk.
      It will cause confusion when these two sysfs nodes works
      together.
      And the flag "od_enabled" is used to control the overdrive function for
      dGPU, like navi10, navi14 and navi21.
      APU like Renior or Vangogh uses this "od_enabled" to configure
      the frequency range of gfx clock, but the max value of frequency
      range will not be higher than the safe limit, it is not "overdrive".
      So this patch adds two new flags -- "fine_grain_enabled" and
      "fine_grain_started" to avoid this confusion, the flag will
      make these two sysfs nodes work separately.
      The flag "fine_grain_enabled" is set as "enabled" by default,
      so the fine grain tuning function will be enabled by default.
      But the flag "fine_grain_started" is set as "false" by default,
      so the fine grain function will not take effect until it is set as
      "true".
      Only when power_dpm_force_perfomance_level is changed to
      "manual" mode, the flag "fine_grain_started" will be set as "true",
      and the fine grain tuning function will be started.
      In other profile modes, including "auto", "high", "low", "profile_peak",
      "profile_standard", "profile_min_sclk", "profile_min_mclk",
      the flag "fine_grain_started" will be set as "false", and the od range of
      fine grain tuning function will be restored default value.
      Signed-off-by: NXiaojian Du <Xiaojian.Du@amd.com>
      Reviewed-by: NHuang Rui <ray.huang@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      08da4fcd
  13. 06 1月, 2021 1 次提交
  14. 24 12月, 2020 1 次提交
  15. 11 12月, 2020 1 次提交
  16. 03 12月, 2020 1 次提交
  17. 25 11月, 2020 1 次提交
  18. 17 11月, 2020 1 次提交
    • X
      drm/amd/pm: add the fine grain tuning function for vangogh · c98ee897
      Xiaojian Du 提交于
      This patch is to add the fine grain tuning function for vangogh.
      This function uses the pp_od_clk_voltage sysfs file to configure the min
      and max value of gfx clock frequency or restore the default value.
      
      Command guide:
      echo "s level value" > pp_od_clk_voltage
              "s" - set the sclk frequency
              "level" - 0 or 1, "0" represents the min value,  "1" represents
              the max value
              "value" - the target value of sclk frequency, it should be
              limited in the safe range
      echo "r" > pp_od_clk_voltage
      	"r" - reset the sclk frequency, restore the default value
              instantly
      echo "c" > pp_od_clk_voltage
              "c" - commit the min and max value of sclk frequency to the system
              only after the commit command, the setting target values by "s" command
              will take effect.
      Example:
      1)check the default sclk frequency
      	$ cat pp_od_clk_voltage
      	OD_SCLK:
      	0:        200Mhz
      	1:       1400Mhz
      	OD_RANGE:
      	SCLK:     200MHz       1400MHz
      2)use "s" -- set command to configure the min or max sclk frequency
      	$ echo "s 0 600" > pp_od_clk_voltage
      	$ echo "s 1 1000" > pp_od_clk_voltage
      	$ echo "c" > pp_od_clk_voltage
              $ cat pp_od_clk_voltage
      	OD_SCLK:
      	0:        600Mhz
      	1:       1000Mhz
      	OD_RANGE:
      	SCLK:     200MHz       1400MHz
      3)use "r" -- reset command to restore the min and max sclk frequency
      	$ echo "r" > pp_od_clk_voltage
              $ cat pp_od_clk_voltage
      	OD_SCLK:
      	0:        200Mhz
      	1:       1400Mhz
      	OD_RANGE:
      	SCLK:     200MHz       1400MHz
      Signed-off-by: NXiaojian Du <Xiaojian.Du@amd.com>
      Reviewed-by: NEvan Quan <evan.quan@amd.com>
      Reviewed-by: NHuang Rui <ray.huang@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      c98ee897
  19. 14 11月, 2020 1 次提交
  20. 16 10月, 2020 2 次提交
  21. 13 10月, 2020 1 次提交
  22. 10 10月, 2020 1 次提交