1. 26 Feb, 2021 11 commits
    • Darren Powell's avatar
      amdgpu/pm: Powerplay API for smu , updates to some pm functions · 8f4828d0
      Darren Powell authored
      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: default avatarDarren Powell <darren.powell@amd.com>
      Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      8f4828d0
    • Darren Powell's avatar
      amdgpu/pm: Powerplay API for smu , changed 4 dpm functions to use API · bc7d6c12
      Darren Powell authored
      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: default avatarDarren Powell <darren.powell@amd.com>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      bc7d6c12
    • Darren Powell's avatar
      amdgpu/pm: Powerplay API for smu , changes to clock and profile mode functions · 2ea092e5
      Darren Powell authored
      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: default avatarDarren Powell <darren.powell@amd.com>
      Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      2ea092e5
    • Darren Powell's avatar
      amdgpu/pm: Powerplay API for smu , changed 5 dpm powergating & sensor functions to use API · 9ab5001a
      Darren Powell authored
      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: default avatarDarren Powell <darren.powell@amd.com>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      9ab5001a
    • Darren Powell's avatar
      amdgpu/pm: Powerplay API for smu , changed 9 pm power functions to use API · 8dfc8c53
      Darren Powell authored
      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: default avatarDarren Powell <darren.powell@amd.com>
      Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      8dfc8c53
    • Darren Powell's avatar
      amdgpu/pm: Powerplay API for smu , changed 6 pm hwmon fan functions to use API · f46587bc
      Darren Powell authored
      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: default avatarDarren Powell <darren.powell@amd.com>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      f46587bc
    • Darren Powell's avatar
      amdgpu/pm: Powerplay API for smu , changed 6 dpm reset functions to use API · bab0f602
      Darren Powell authored
      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: default avatarDarren Powell <darren.powell@amd.com>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      bab0f602
    • Darren Powell's avatar
      amdgpu/pm: Powerplay API for smu , added get_performance_level · 4df144f8
      Darren Powell authored
      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: default avatarDarren Powell <darren.powell@amd.com>
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      4df144f8
    • Changfeng's avatar
      drm/amdgpu: decline max_me for mec2_fw remove in renoir/arcturus · 996aede2
      Changfeng authored
      The value of max_me in amdgpu_gfx_rlc_setup_cp_table should reduce to 4
      when mec2_fw is removed on asic renoir/arcturus. Or it will cause kernel
      NULL pointer when modprobe driver.
      Signed-off-by: default avatarChangfeng <Changfeng.Zhu@amd.com>
      Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      996aede2
    • Asher.Song's avatar
      drm/amdgpu:disable VCN for Navi12 SKU · 650bc7ae
      Asher.Song authored
      Navi12 0x7360/C7 SKU has no video support, so remove it.
      Reviewed-by: default avatarGuchun Chen <guchun.chen@amd.com>
      Signed-off-by: default avatarAsher.Song <Asher.Song@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      650bc7ae
    • Dennis Li's avatar
      drm/amdgpu: reserve backup pages for bad page retirment · f89b881c
      Dennis Li authored
      To ensure user has a constant of VRAM accessible in run-time, driver
      reserves limit backup pages when init, and return ones when bad pages
      retired, to keep no change of unused memory size.
      
      v2: refine codes to calculate badpags threshold
      Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
      Signed-off-by: default avatarDennis Li <Dennis.Li@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      f89b881c
  2. 24 Feb, 2021 13 commits
  3. 22 Feb, 2021 16 commits