[PATCH 0/8] amdgpu/pm: Implement emit_clock_levels for arcturus,aldebaran
Quan, Evan
Evan.Quan at amd.com
Fri Jul 28 02:49:11 UTC 2023
[AMD Official Use Only - General]
The series looks good to me.
Reviewed-by: Evan Quan evan.quan at amd.com<mailto:evan.quan at amd.com>
However better to split the changes of patch1 into two separate patches on your submission.
Replace print_clock_levels with emit_clock_levels for arcturus
* replace .print_clk_levels with .emit_clk_levels in arcturus_ppt_funcs
* added extra parameter int *offset
* removed var size, uses arg *offset instead
* removed call to smu_cmn_get_sysfs_buf
* errors are returned to caller
* returns 0 on success
Those changes are included in one patch.
additional incidental changes
* changed type of var i, now to remove comparing mismatch types
* renamed var s/now/cur_value/
* switch statement default now returns -EINVAL
* RAS Recovery returns -EBUSY
While those are included in another patch.
Same applied to patch5.
BR,
Evan
From: Powell, Darren <Darren.Powell at amd.com>
Sent: Friday, July 28, 2023 3:51 AM
To: amd-gfx at lists.freedesktop.org
Cc: Lazar, Lijo <Lijo.Lazar at amd.com>; Quan, Evan <Evan.Quan at amd.com>; Yu, Lang <Lang.Yu at amd.com>; Huang, Ray <Ray.Huang at amd.com>
Subject: Re: [PATCH 0/8] amdgpu/pm: Implement emit_clock_levels for arcturus,aldebaran
Hi all,
Just looking for anyone who could RB or ACK this patch set so I can submit it?
Thanks
Darren
________________________________
From: Powell, Darren <Darren.Powell at amd.com<mailto:Darren.Powell at amd.com>>
Sent: Thursday, April 27, 2023 2:27 AM
To: amd-gfx at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org> <amd-gfx at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org>>
Cc: Lazar, Lijo <Lijo.Lazar at amd.com<mailto:Lijo.Lazar at amd.com>>; Quan, Evan <Evan.Quan at amd.com<mailto:Evan.Quan at amd.com>>; Yu, Lang <Lang.Yu at amd.com<mailto:Lang.Yu at amd.com>>; Huang, Ray <Ray.Huang at amd.com<mailto:Ray.Huang at amd.com>>; david.nieto at amd.com<mailto:david.nieto at amd.com> <david.nieto at amd.com<mailto:david.nieto at amd.com>>; Powell, Darren <Darren.Powell at amd.com<mailto:Darren.Powell at amd.com>>
Subject: [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: (git at gitlab.freedesktop.org:agd5f<mailto:git at gitlab.freedesktop.org: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
--
2.34.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20230728/724f5475/attachment.htm>
More information about the amd-gfx
mailing list