[PATCH 0/8] amdgpu/pm: Powerplay API for smu

Quan, Evan Evan.Quan at amd.com
Mon Dec 21 03:04:13 UTC 2020


[AMD Official Use Only - Internal Distribution Only]

Thanks for these cleaups. The series is acked-by: Evan Quan <evan.quan at amd.com>

-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Darren Powell
Sent: Saturday, December 19, 2020 8:48 AM
To: amd-gfx at lists.freedesktop.org
Cc: Powell, Darren <Darren.Powell at amd.com>
Subject: [PATCH 0/8] amdgpu/pm: Powerplay API for smu


=== Description ===
Patches to add the Powerplay API to smu and simplify dpm/pm calling code

=== Test System ===
* DESKTOP(AMD FX-8350 + NAVI10(731F/ca), BIOS: F2)  + ISO(Ubuntu 20.04.1 LTS)  + Kernel(5.9.0-rc5-custom-pmcallback-00865-gd3b9ec1a13c9)

=== Patch Summary ===
   linux: (git://people.freedesktop.org/~agd5f/linux) origin/amd-staging-drm-next @ d3b9ec1a13c9
    + 05e1d87d1cb4 amdgpu/pm: Powerplay API for smu , added get_performance_level
    + b9e2be067f01 amdgpu/pm: Powerplay API for smu , changed 6 dpm reset functions to use API
    + 9add1d6485a4 amdgpu/pm: Powerplay API for smu , changed 6 pm hwmon fan functions to use API
    + c02b35074f14 amdgpu/pm: Powerplay API for smu , changed 9 pm power functions to use API
    + 483bd1207f2c amdgpu/pm: Powerplay API for smu , changed 5 dpm powergating & sensor functions to use API
    + f91c1665e30e amdgpu/pm: Powerplay API for smu , changes to clock and profile mode functions
    + d1400afa4785 amdgpu/pm: Powerplay API for smu , changed 4 dpm functions to use API
    + 2f12f7afa690 amdgpu/pm: Powerplay API for smu , updates to some pm functions

=== Tests ===
** 0001
 amdgpu_get_power_dpm_force_performance_level()    <- /sys/class/drm/card0/device/power_dpm_force_performance_level
** 0002
 amdgpu_dpm_set_mp1_state              <- systemctl suspend
 amdgpu_dpm_mode2_reset                <- untested: needs Arctic Islands Hardware (VEGAx, RAVEN)
 amdgpu_dpm_switch_power_profile       <- untested
 amdgpu_dpm_set_xgmi_pstate            <- untested: amdgpu_xgmi_set_pstate():411 pstate switching disabled
 amdgpu_dpm_set_df_cstate              <- untested: needs ras enabled hardware
 amdgpu_dpm_enable_mgpu_fan_boost      <- untested: needs multi-gpu hardware
** 0003
 amdgpu_hwmon_get_pwm1_enable                    <- /sys/class/drm/card0/device/hwmon/hwmon?/pwm1_enable
 amdgpu_hwmon_set_pwm1_enable                    <- /sys/class/drm/card0/device/hwmon/hwmon?/pwm1_enable
 amdgpu_hwmon_set_pwm1                           <- /sys/class/drm/card0/device/hwmon/hwmon?/pwm1
 amdgpu_hwmon_get_pwm1                           <- /sys/class/drm/card0/device/hwmon/hwmon?/pwm1
 amdgpu_hwmon_get_fan1_input                     <- /sys/class/drm/card0/device/hwmon/hwmon?/fan1_input
 amdgpu_hwmon_get_fan1_target                    <- /sys/class/drm/card0/device/hwmon/hwmon?/fan1_target
 amdgpu_hwmon_set_fan1_target                    <- /sys/class/drm/card0/device/hwmon/hwmon?/fan1_target
 amdgpu_hwmon_get_fan1_enable                    <- /sys/class/drm/card0/device/hwmon/hwmon?/fan1_enable
 amdgpu_hwmon_set_fan1_enable                    <- /sys/class/drm/card0/device/hwmon/hwmon?/fan1_enable
** 0004
 amdgpu_get_power_dpm_state                      <- /sys/class/drm/card0/device/power_dpm_state
 amdgpu_set_power_dpm_force_performance_level    <- /sys/class/drm/card0/device/power_dpm_force_performance_level
 amdgpu_get_pp_num_states                        <- /sys/class/drm/card0/device/pp_num_states
 amdgpu_get_pp_cur_state                         <- /sys/class/drm/card0/device/pp_cur_state
 amdgpu_get_pp_table                             <- /sys/class/drm/card0/device/pp_table
 amdgpu_get_pp_features                          <- /sys/class/drm/card0/device/pp_features
 amdgpu_hwmon_show_power_cap_max                 <- /sys/class/drm/card0/device/hwmon/hwmon?/power1_cap_max
 amdgpu_hwmon_show_power_cap                     <- /sys/class/drm/card0/device/hwmon/hwmon?/power1_cap
 amdgpu_hwmon_set_power_cap                      <- /sys/class/drm/card0/device/hwmon/hwmon?/power1_cap
** 0005
 amdgpu_dpm_baco_enter                  <- untested: called from runtime.pm
 amdgpu_dpm_baco_exit                   <- untested: called from runtime.pm
 amdgpu_dpm_is_baco_supported           <- untested: needs other Hardware(cik, vi, soc15)
 amdgpu_dpm_baco_reset                  <- untested: needs other Hardware(cik, vi, soc15)
** 0006
 amdgpu_get_pp_dpm_sclk              <- /sys/class/drm/card0/device/pp_dpm_sclk
 amdgpu_set_pp_dpm_sclk              <- /sys/class/drm/card0/device/pp_dpm_sclk
 amdgpu_get_pp_dpm_mclk              <- /sys/class/drm/card0/device/pp_dpm_mclk
 amdgpu_set_pp_dpm_mclk              <- /sys/class/drm/card0/device/pp_dpm_mclk
 amdgpu_get_pp_dpm_socclk            <- /sys/class/drm/card0/device/pp_dpm_socclk
 amdgpu_set_pp_dpm_socclk            <- /sys/class/drm/card0/device/pp_dpm_socclk
 amdgpu_get_pp_dpm_fclk              <- /sys/class/drm/card0/device/pp_dpm_fclk
 amdgpu_set_pp_dpm_fclk              <- /sys/class/drm/card0/device/pp_dpm_fclk
 amdgpu_get_pp_dpm_dcefclk           <- /sys/class/drm/card0/device/pp_dpm_dcefclk
 amdgpu_set_pp_dpm_dcefclk           <- /sys/class/drm/card0/device/pp_dpm_dcefclk
 amdgpu_get_pp_dpm_pcie              <- /sys/class/drm/card0/device/pp_dpm_pcie
 amdgpu_set_pp_dpm_pcie              <- /sys/class/drm/card0/device/pp_dpm_pcie
 amdgpu_get_pp_power_profile_mode    <- /sys/class/drm/card0/device/pp_power_profile_mode
 amdgpu_set_pp_power_profile_mode    <- /sys/class/drm/card0/device/pp_power_profile_mode
 amdgpu_get_gpu_metrics              <- /sys/class/drm/card0/device/gpu_metrics
** 0007
 amdgpu_pm_compute_clocks            <- untested
 amdgpu_dpm_set_powergating_by_smu   <- untested
 amdgpu_dpm_get_mclk                 <- untested
 amdgpu_dpm_get_sclk                 <- untested
** 0008
 amdgpu_get_pp_od_clk_voltage                 <- /sys/class/drm/card0/device/pp_od_clk_voltage
 amdgpu_set_pp_od_clk_voltage                 <- /sys/class/drm/card0/device/pp_od_clk_voltage
 amdgpu_set_pp_table                          <- /sys/class/drm/card0/device/pp_table
 amdgpu_set_power_dpm_force_performance_level <- /sys/class/drm/card0/device/power_dpm_force_performance_level

=== Summary of Untested Functions ===
** 0002
 amdgpu_dpm_mode2_reset                <- untested: needs Arctic Islands Hardware (VEGAx, RAVEN)
 amdgpu_dpm_switch_power_profile       <- untested: called during initialization
 amdgpu_dpm_set_xgmi_pstate            <- untested: amdgpu_xgmi_set_pstate():411 pstate switching disabled
 amdgpu_dpm_set_df_cstate              <- untested: needs ras enabled hardware
 amdgpu_dpm_enable_mgpu_fan_boost      <- untested: needs multi-gpu hardware
** 0005
 amdgpu_dpm_baco_enter                  <- untested: called from runtime.pm
 amdgpu_dpm_baco_exit                   <- untested: called from runtime.pm
 amdgpu_dpm_is_baco_supported           <- untested: needs other Hardware(cik, vi, soc15)
 amdgpu_dpm_baco_reset                  <- untested: needs other Hardware(cik, vi, soc15)
** 0007
 amdgpu_pm_compute_clocks            <- untested
 amdgpu_dpm_set_powergating_by_smu   <- untested
 amdgpu_dpm_get_mclk                 <- untested
 amdgpu_dpm_get_sclk                 <- untested
** 0008
 amdgpu_get_pp_od_clk_voltage                 <- file not found
 amdgpu_set_pp_od_clk_voltage                 <- file not found
 amdgpu_set_pp_table                          <- no binary data to test with

=== Cover Letter ===
Darren Powell (8):
  amdgpu/pm: Powerplay API for smu , added get_performance_level
  amdgpu/pm: Powerplay API for smu , changed 6 dpm reset functions to
    use API
  amdgpu/pm: Powerplay API for smu , changed 6 pm hwmon fan functions to
    use API
  amdgpu/pm: Powerplay API for smu , changed 9 pm power functions to use
    API
  amdgpu/pm: Powerplay API for smu , changed 5 dpm powergating & sensor
    functions to use API
  amdgpu/pm: Powerplay API for smu , changes to clock and profile mode
    functions
  amdgpu/pm: Powerplay API for smu , changed 4 dpm functions to use API
  amdgpu/pm: Powerplay API for smu , updates to some pm functions

 drivers/gpu/drm/amd/pm/amdgpu_dpm.c       | 226 +++-----
 drivers/gpu/drm/amd/pm/amdgpu_pm.c        | 596 +++++-----------------
 drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h   |  79 ++-
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 334 +++++++++---
 4 files changed, 511 insertions(+), 724 deletions(-)

--
2.25.1

_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Cevan.quan%40amd.com%7C35efd75734c84eae04bf08d8a3b7df1a%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637439357421991565%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=cvVKTf%2FK%2FNuC2SE7H%2F88DRRfWmxVFqETJ%2BlROM6JSGs%3D&reserved=0


More information about the amd-gfx mailing list