[AMD Official Use Only - General]

The series looks good to me.
Reviewed-by: Evan Quan evan.q...@amd.com<mailto:evan.q...@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.pow...@amd.com>
Sent: Friday, July 28, 2023 3:51 AM
To: amd-gfx@lists.freedesktop.org
Cc: Lazar, Lijo <lijo.la...@amd.com>; Quan, Evan <evan.q...@amd.com>; Yu, Lang 
<lang...@amd.com>; Huang, Ray <ray.hu...@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.pow...@amd.com<mailto:darren.pow...@amd.com>>
Sent: Thursday, April 27, 2023 2:27 AM
To: amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org> 
<amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org>>
Cc: Lazar, Lijo <lijo.la...@amd.com<mailto:lijo.la...@amd.com>>; Quan, Evan 
<evan.q...@amd.com<mailto:evan.q...@amd.com>>; Yu, Lang 
<lang...@amd.com<mailto:lang...@amd.com>>; Huang, Ray 
<ray.hu...@amd.com<mailto:ray.hu...@amd.com>>; 
david.ni...@amd.com<mailto:david.ni...@amd.com> 
<david.ni...@amd.com<mailto:david.ni...@amd.com>>; Powell, Darren 
<darren.pow...@amd.com<mailto:darren.pow...@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: 
(g...@gitlab.freedesktop.org:agd5f<mailto:g...@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

Reply via email to