summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDarren Powell <darren.powell@amd.com>2021-06-24 22:54:35 -0400
committerAlex Deucher <alexander.deucher@amd.com>2021-06-30 00:18:56 -0400
commit91161b06be5729050a11e36366d2db8a679f35b6 (patch)
tree03f0623e0944b762d133c70fbf5051114356c964 /tools
parented50995514d319ff27dafe3747f04abab9e87bdf (diff)
amdgpu/pm: remove code duplication in show_power_cap calls
v3: updated patch to apply to latest code v2: reorder to check pointers before calling pm_runtime_* functions created generic function and call with enum from * amdgpu_hwmon_show_power_cap_max * amdgpu_hwmon_show_power_cap * amdgpu_hwmon_show_power_cap_default === Test === AMDGPU_PCI_ADDR=`lspci -nn | grep "VGA\|Display" | cut -d " " -f 1` AMDGPU_HWMON=`ls -la /sys/class/hwmon | grep $AMDGPU_PCI_ADDR | cut -d " " -f 10` HWMON_DIR=/sys/class/hwmon/${AMDGPU_HWMON} cp pp_show_power_cap.txt{,.old} lspci -nn | grep "VGA\|Display" > pp_show_power_cap.test.log FILES=" power1_cap power1_cap_max power1_cap_default " for f in $FILES do echo $f = `cat $HWMON_DIR/$f` >> pp_show_power_cap.test.log done Signed-off-by: Darren Powell <darren.powell@amd.com> Reviewed-by: Kevin Wang <kevin1.wang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions