Skip to content

amdgpu/pm: Implement emit_clock_levels for arcturus, aldebaran

Darren Powell amd-gfx 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8amdgpu/pm: Replace print_clock_levels with emit_clock_levels for arcturusdrivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c+27 -270 replies
2/8amdgpu/pm: Optimize emit_clock_levels for arcturus - part 1drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c+57 -690 replies
3/8amdgpu/pm: Optimize emit_clock_levels for arcturus - part 2drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c+22 -231 reply
4/8amdgpu/pm: Optimize emit_clock_levels for arcturus - part 3drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c+24 -531 reply
5/8amdgpu/pm: Replace print_clock_levels with emit_clock_levels for aldebarandrivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c+31 -321 reply
6/8amdgpu/pm: Optimize emit_clock_levels for aldebaran - part 1drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c+57 -680 replies
7/8amdgpu/pm: Optimize emit_clock_levels for aldebaran - part 2drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c+13 -140 replies
8/8amdgpu/pm: Optimize emit_clock_levels for aldebaran - part 3drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c+27 -551 reply

Reviews trailers per patch

None of the 8 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchEvan Quan [email protected]Lijo Lazar
SeriesR-b R-b
1/8
2/8
3/8
4/8
5/8
6/8
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/8] amdgpu/pm: Implement emit_clock_levels for arcturus, aldebaran

amdgpu/pm: Implement emit_clock_levels for arcturus,aldebaran

== Description ==
Scnprintf use within the kernel is not recommended, but simple sysfs_emit replacement has not been successful due to the page alignment requirement of the function. This patch set implements a new api "emit_clock_levels" to facilitate passing both the base and offset to the device rather than just the write pointer.

This patch set replaces print_clock_levels for arcturus and aldebaran platforms with emit_clock_levels, and also optimizes the code to reduce the code duplication for each different clock. This was spread into three parts to show more clearly the changes made to the code, followed by combining the common code into a second switch statement. It is similar to previous work on vega10 to implement emit_clk_levels
commit a63e6b83 ("amdgpu/pm: Implement emit_clk_levels for vega10")
with the addition of the optimization to reduce code duplication.

== Patch Summary ==
linux: ([email protected]:agd5f) origin/amd-staging-drm-next @ 2d8c6b82e241
+ 9a269da4c047 amdgpu/pm: Replace print_clock_levels with emit_clock_levels for arcturus
+ 51ce0fcc9599 amdgpu/pm: Optimize emit_clock_levels for arcturus - part 1
+ dcaa5b7551dd amdgpu/pm: Optimize emit_clock_levels for arcturus - part 2
+ 1d16d820e4ee amdgpu/pm: Optimize emit_clock_levels for arcturus - part 3
+ b374fbf6013d amdgpu/pm: Replace print_clock_levels with emit_clock_levels for aldebaran
+ 2ecf48d3e83c amdgpu/pm: Optimize emit_clock_levels for aldebaran - part 1
+ fd8c21e1d1e4 amdgpu/pm: Optimize emit_clock_levels for aldebaran - part 2
+ a67ce808f18c amdgpu/pm: Optimize emit_clock_levels for aldebaran - part 3

== System Summary ==
* DESKTOP(AMD Ryzen9 7900 + NAVI10(731f/ca), BIOS: 1.11)
+ ISO(Ubuntu 22.04.2 LTS)
+ Kernel(6.1.11-20230412-fdoagd5f-g2d8c6b82e241)

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

lspci -nn | grep "VGA\|Display" > $LOGFILE
printf 'OD enabled = %X\n' "$(( cat /sys/module/amdgpu/parameters/ppfeaturemask & 0x4000 ))" >> $LOGFILE FILES="pp_od_clk_voltage
pp_dpm_sclk
pp_dpm_mclk
pp_dpm_pcie
pp_dpm_socclk
pp_dpm_fclk
pp_dpm_dcefclk
pp_dpm_vclk
pp_dpm_dclk "

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

Darren Powell (8):
amdgpu/pm: Replace print_clock_levels with emit_clock_levels for
arcturus
amdgpu/pm: Optimize emit_clock_levels for arcturus - part 1 amdgpu/pm: Optimize emit_clock_levels for arcturus - part 2 amdgpu/pm: Optimize emit_clock_levels for arcturus - part 3 amdgpu/pm: Replace print_clock_levels with emit_clock_levels for
aldebaran
amdgpu/pm: Optimize emit_clock_levels for aldebaran - part 1 amdgpu/pm: Optimize emit_clock_levels for aldebaran - part 2 amdgpu/pm: Optimize emit_clock_levels for aldebaran - part 3

 .../gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 166 ++++++----------
 .../drm/amd/pm/swsmu/smu13/aldebaran_ppt.c    | 181 +++++++-----------
 2 files changed, 132 insertions(+), 215 deletions(-)

base-commit: 2d8c6b82e241f2d1a802ae6bbc24c127e689c724

Signature · 1 line
2.34.1