All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Implement parallel sysfs_emit solution for navi10
@ 2022-01-22  3:46 Darren Powell
  2022-01-22  3:46 ` [PATCH 1/3] amdgpu/pm: Implement new API function "emit" that accepts buffer base and write offset Darren Powell
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Darren Powell @ 2022-01-22  3:46 UTC (permalink / raw)
  To: amd-gfx; +Cc: Darren Powell

== 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 is only implemented for navi10 for some clocks to seek comment on the
implementation before extending the implementation to other clock values and devices.

Needs to be verified on a platform that supports the overclocking

   (v2)
      Update to apply on commit 801771de03
      adjust printing of empty carriage return only if size == 0
      change return from amdgpu_dpm_emit_clock_levels if emit_clock_levels not found

== Patch Summary ==
   linux: (git@gitlab.freedesktop.org:agd5f) origin/amd-staging-drm-next @ 28907fd9e048
    + f83a3144ede4 amdgpu/pm: Implement new API function "emit" that accepts buffer base and write offset
    + 82de36426a1f amdgpu/pm: insert attempt to call emit_clock_levels into amdgpu_get_pp_od_clk_voltage
    + 32f0fcf45dd8 amdgpu/pm: Add Error Handling to emit_clocks stack

== System Summary ==
 * DESKTOP(AMD FX-8350 + NAVI10(731F/ca), BIOS: F2)
  + ISO(Ubuntu 20.04.3 LTS)
  + Kernel(5.13.0-fdoagd5f-20220112-g28907fd9e0)

== Test ==
LOGFILE=pp_clk.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_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 (3):
  amdgpu/pm: Implement new API function "emit" that accepts buffer base
    and write offset
  amdgpu/pm: insert attempt to call emit_clock_levels into
    amdgpu_get_pp_od_clk_voltage
  amdgpu/pm: Add Error Handling to emit_clocks stack

 .../gpu/drm/amd/include/kgd_pp_interface.h    |   1 +
 drivers/gpu/drm/amd/pm/amdgpu_dpm.c           |  21 ++
 drivers/gpu/drm/amd/pm/amdgpu_pm.c            |  49 +++--
 drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h       |   4 +
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c     |  44 +++-
 drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h |  14 ++
 .../gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c   | 188 ++++++++++++++++++
 7 files changed, 302 insertions(+), 19 deletions(-)


base-commit: 28907fd9e04859fab86a143271d29ff0ff043154
-- 
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread
* [PATCH 0/3] amdgpu/pm: Implement parallel sysfs_emit solution for navi10
@ 2021-12-08  6:36 Darren Powell
  2021-12-08  6:36 ` [PATCH 1/3] amdgpu/pm: Implement new API function "emit" that accepts buffer base and write offset Darren Powell
  0 siblings, 1 reply; 10+ messages in thread
From: Darren Powell @ 2021-12-08  6:36 UTC (permalink / raw)
  To: amd-gfx; +Cc: Darren Powell

== 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 is only implemented for navi10 for some clocks to seek comment on the
implementation before extending the implementation to other clock values and devices.

Needs to be verified on a platform that supports the overclocking

== Patch Summary ==
 linux: (git@gitlab.freedesktop.org:agd5f) origin/amd-staging-drm-next @ be0118f90e18
    + 351ae7734898 amdgpu/pm: Implement new API function "emit" that accepts buffer base and write offset
    + 76c13c49fc6b amdgpu/pm: insert attempt to call emit_clock_levels into amdgpu_get_pp_od_clk_voltage
    + 28c533371023 amdgpu/pm: Add Error Handling to emit_clocks stack

== System Summary ==
 * DESKTOP(AMD FX-8350 + NAVI10(731F/ca), BIOS: F2)
  + ISO(Ubuntu 20.04.3 LTS)
  + Kernel(5.13.0-20211128-be0118f90e18-fdoagd5f)

== Test ==
LOGFILE=pp_clk.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_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 (3):
  amdgpu/pm: Implement new API function "emit" that accepts buffer base
    and write offset
  amdgpu/pm: insert attempt to call emit_clock_levels into
    amdgpu_get_pp_od_clk_voltage
  amdgpu/pm: Add Error Handling to emit_clocks stack

 .../gpu/drm/amd/include/kgd_pp_interface.h    |   1 +
 drivers/gpu/drm/amd/pm/amdgpu_pm.c            |  65 ++++--
 drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h       |   3 +
 drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h       |  18 ++
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c     |  49 ++++-
 .../gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c   | 188 ++++++++++++++++++
 6 files changed, 301 insertions(+), 23 deletions(-)


base-commit: be0118f90e18e3fb8191f17f51a9addc93d0f185
-- 
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-01-24  3:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-22  3:46 [PATCH v2 0/3] Implement parallel sysfs_emit solution for navi10 Darren Powell
2022-01-22  3:46 ` [PATCH 1/3] amdgpu/pm: Implement new API function "emit" that accepts buffer base and write offset Darren Powell
2022-01-24  2:59   ` Quan, Evan
2022-01-22  3:46 ` [PATCH 2/3] amdgpu/pm: insert attempt to call emit_clock_levels into amdgpu_get_pp_od_clk_voltage Darren Powell
2022-01-22  3:46 ` [PATCH 3/3] amdgpu/pm: Add Error Handling to emit_clocks stack Darren Powell
2022-01-24  3:01   ` Quan, Evan
2022-01-24  3:01 ` [PATCH v2 0/3] Implement parallel sysfs_emit solution for navi10 Quan, Evan
  -- strict thread matches above, loose matches on Subject: below --
2021-12-08  6:36 [PATCH 0/3] amdgpu/pm: " Darren Powell
2021-12-08  6:36 ` [PATCH 1/3] amdgpu/pm: Implement new API function "emit" that accepts buffer base and write offset Darren Powell
2021-12-09  1:48   ` Quan, Evan
2021-12-09  5:18     ` Powell, Darren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.