amdgpu/pm: Replace vega10 usage of sprintf with sysfs_emit
authorDarren Powell <darren.powell@amd.com>
Sat, 10 Jul 2021 04:24:43 +0000 (00:24 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 10 Aug 2021 14:34:55 +0000 (10:34 -0400)
commit21f0742af1ddb69e12b0b7f9d176a528846c4690
tree3b5e30b622fa6c6d7348cabd41dc2cbf982bbe8d
parente738c2f0e654832f9209a962c5020741aee30620
amdgpu/pm: Replace vega10 usage of sprintf with sysfs_emit

 initial modification of files
  vega10_hwmgr.c

=== Test ===
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

Signed-off-by: Darren Powell <darren.powell@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c