[PATCH 0/4] Replace usage of sprintf with sysfs_emit in hwmgr powerplay

Darren Powell darren.powell at amd.com
Sun Aug 8 05:33:08 UTC 2021


=== Description ===
Replace usage of sprintf with sysfs_emit in hwmgr powerplay

=== Test System ===
* DESKTOP(AMD FX-8350 + VEGA10(687F/c3), BIOS: F2)
 + ISO(Ubuntu 20.04.2 LTS)
 + Kernel(5.13.0-gb1d634be9673-fdoagd5f)


=== Patch Summary ===
   linux: (git at gitlab.freedesktop.org:agd5f) origin/amd-staging-drm-next @ 2f56b0d631eb
    + 0ede8d563c58 amdgpu/pm: Replace vega10 usage of sprintf with sysfs_emit
    + 1d666a0652a1 amdgpu/pm: Replace vega12,20 usage of sprintf with sysfs_emit
    + 8bad9ffba08b amdgpu/pm: Replace hwmgr smu usage of sprintf with sysfs_emit
    + 773733df2f32 amdgpu/pm: Replace amdgpu_pm usage of sprintf with sysfs_emit


=== General Test for each platform ===
AMDGPU_PCI_ADDR=`lspci -nn | grep "VGA\|Display" | cut -d " " -f 1`
AMDGPU_HWMON=`ls -la /sys/class/hwmon | grep $AMDGPU_PCI_ADDR | awk '{print $9}'`
HWMON_DIR=/sys/class/hwmon/${AMDGPU_HWMON}
LOGFILE=pp_printf.test.log

lspci -nn | grep "VGA\|Display"  > $LOGFILE
FILES="pp_dpm_sclk 
pp_features
pp_power_profile_mode "

for f in $FILES
do
  echo === $f === >> $LOGFILE
  cat $HWMON_DIR/device/$f >> $LOGFILE
done
cat $LOGFILE

Darren Powell (4):
  amdgpu/pm: Replace vega10 usage of sprintf with sysfs_emit
  amdgpu/pm: Replace vega12,20 usage of sprintf with sysfs_emit
  amdgpu/pm: Replace hwmgr smu usage of sprintf with sysfs_emit
  amdgpu/pm: Replace amdgpu_pm usage of sprintf with sysfs_emit

 drivers/gpu/drm/amd/pm/amdgpu_pm.c            | 16 ++--
 .../drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c  | 22 +++---
 .../drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c   | 38 +++++-----
 .../drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c   |  7 +-
 .../drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 38 +++++-----
 .../drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c | 14 ++--
 .../drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c | 74 +++++++++----------
 7 files changed, 105 insertions(+), 104 deletions(-)


base-commit: 2f56b0d631eba0e76cfc789d85cc5632256ad42d
-- 
2.32.0



More information about the amd-gfx mailing list