linux-stable/drivers/gpu
Darren Powell 91161b06be 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>
2021-06-30 00:18:56 -04:00
..
drm amdgpu/pm: remove code duplication in show_power_cap calls 2021-06-30 00:18:56 -04:00
host1x gpu: host1x: Split up client initalization and registration 2021-05-17 12:31:05 +02:00
ipu-v3 gpu: ipu-v3: Add Rec.709 limited range support to DP 2021-05-10 17:20:29 +02:00
trace
vga vgaarb: Use ACPI HID name to find integrated GPU 2021-05-20 14:55:56 -04:00
Makefile