mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-26 05:24:59 +00:00
== Description ==
All the power profile modes use the same strings (or a subset of)
Creating a public array of the strings will allow sharing rather than
duplicating for each chip
First patch only implements change for navi10, followup with other chips
== Changes ==
Create a declaration of the public array in kgd_pp_interface.h
Define the public array in amdgpu_pm.c
Modify the implementaiton of navi10_get_power_profile_mode to use new array
== Test ==
LOGFILE=pp_profile_strings.test.log
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}
lspci -nn | grep "VGA\|Display" > $LOGFILE
FILES="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: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
||
|---|---|---|
| .. | ||
| asic_reg | ||
| ivsrcid | ||
| aldebaran_ip_offset.h | ||
| amd_acpi.h | ||
| amd_pcie_helpers.h | ||
| amd_pcie.h | ||
| amd_shared.h | ||
| arct_ip_offset.h | ||
| atom-bits.h | ||
| atom-names.h | ||
| atom-types.h | ||
| atombios.h | ||
| atomfirmware.h | ||
| atomfirmwareid.h | ||
| beige_goby_ip_offset.h | ||
| cgs_common.h | ||
| cik_structs.h | ||
| cyan_skillfish_ip_offset.h | ||
| dimgrey_cavefish_ip_offset.h | ||
| discovery.h | ||
| displayobject.h | ||
| dm_pp_interface.h | ||
| kgd_kfd_interface.h | ||
| kgd_pp_interface.h | ||
| navi10_enum.h | ||
| navi10_ip_offset.h | ||
| navi12_ip_offset.h | ||
| navi14_ip_offset.h | ||
| pptable.h | ||
| renoir_ip_offset.h | ||
| sienna_cichlid_ip_offset.h | ||
| soc15_hw_ip.h | ||
| soc15_ih_clientid.h | ||
| v9_structs.h | ||
| v10_structs.h | ||
| vangogh_ip_offset.h | ||
| vega10_enum.h | ||
| vega10_ip_offset.h | ||
| vega20_ip_offset.h | ||
| vi_structs.h | ||
| yellow_carp_offset.h | ||