From: Darren Powell <darren.powell@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Darren Powell <darren.powell@amd.com>
Subject: [PATCH v3 0/3] amdgpu/pm: Implement parallel sysfs_emit solution for navi10
Date: Tue, 25 Jan 2022 23:54:38 -0500 [thread overview]
Message-ID: <20220126045441.3891-1-darren.powell@amd.com> (raw)
== 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
(v3)
Rewrote patchset to order patches as (API, hw impl, usecase)
(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
+ f3c1d971ea17 amdgpu/pm: Implement new API function "emit" that accepts buffer base and write offset
+ c67ac3384682 amdgpu/pm: Implemention of emit_clk_levels for navi10 that accepts buffer base and write offset
+ 734cca28fed3 amdgpu/pm: Linked emit_clock_levels to use cases amdgpu_get_pp_{dpm_clock,od_clk_voltage}
== 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: Implemention of emit_clk_levels for navi10 that accepts
buffer base and write offset
amdgpu/pm: Linked emit_clock_levels to use cases
amdgpu_get_pp_{dpm_clock,od_clk_voltage}
.../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 | 42 +++-
drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 14 ++
.../gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 188 ++++++++++++++++++
7 files changed, 300 insertions(+), 19 deletions(-)
base-commit: 28907fd9e04859fab86a143271d29ff0ff043154
--
2.34.1
next reply other threads:[~2022-01-26 4:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-26 4:54 Darren Powell [this message]
2022-01-26 4:54 ` [PATCH v3 1/3] amdgpu/pm: Implement new API function "emit" that accepts buffer base and write offset Darren Powell
2022-01-26 4:54 ` [PATCH v3 2/3] amdgpu/pm: Implemention of emit_clk_levels for navi10 " Darren Powell
2022-01-26 4:54 ` [PATCH v3 3/3] amdgpu/pm: Linked emit_clock_levels to use cases amdgpu_get_pp_{dpm_clock, od_clk_voltage} Darren Powell
2022-01-27 2:22 ` [PATCH v3 3/3] amdgpu/pm: Linked emit_clock_levels to use cases amdgpu_get_pp_{dpm_clock,od_clk_voltage} Quan, Evan
2022-02-24 4:11 ` [PATCH v3 0/3] amdgpu/pm: Implement parallel sysfs_emit solution for navi10 Alex Deucher
2022-02-26 21:32 ` Powell, Darren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220126045441.3891-1-darren.powell@amd.com \
--to=darren.powell@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.