[PATCH 0/5] Modify smu_get_power_limit to implement Powerplay API

Darren Powell darren.powell at amd.com
Thu May 20 03:57:17 UTC 2021


=== Description ===
Modify smu_get_power_limit to implement Powerplay API

=== Test System ===
* DESKTOP(AMD FX-8350 + NAVI10(731F/ca), BIOS: F2)
 + ISO(Ubuntu 20.04.1 LTS)
 + Kernel(5.11.0-custom-fdoagd5f)

=== Patch Summary ===
   linux: (git at gitlab.freedesktop.org:agd5f) origin/amd-staging-drm-next @ b1d634be9673
    + 538c6ba2ec30 amdgpu/pm: reorder definition of swsmu_pm_funcs for readability
    + 7b3ff20b1454 amdgpu/pm: simplify logic of smu_get_power_level
    + 72f426c7d850 amdgpu/pm: modify Powerplay API get_power_limit to use pp_power_limit_level
    + e6618a44993a amdgpu/pm: modify smu_get_power_limit to implement Powerplay API
    + 16fb37b834e4 amdgpu/pm: add kernel documentation for smu_get_power_limit


=== Tests ===
==== get_power_limit Test ====
* Test 
 AMDGPU_PCI_ADDR=`lspci -nn | grep "VGA\|Display" | cut -d " " -f 1`
 AMDGPU_HWMON=`ls -la /sys/class/hwmon | grep $AMDGPU_PCI_ADDR | cut -d " " -f 10`
 HWMON_DIR=/sys/class/hwmon/${AMDGPU_HWMON}

 lspci -nn | grep "VGA\|Display" ; \
 echo "=== power1 cap ===" ; cat $HWMON_DIR/power1_cap ;           \
 echo "=== power1 cap max ===" ; cat $HWMON_DIR/power1_cap_max ;   \
 echo "=== power1 cap def ===" ; cat $HWMON_DIR/power1_cap_default

==== Documentation Test ====
* Insert temp documentation
** Documentation/gpu/amdgpu.rst
 vi Documentation/gpu/amdgpu.rst
** added text to start
------------START------------
Test Documentation
==================

smu_get_power_limit
-------------------
.. kernel-doc:: drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
   :identifiers: smu_get_power_limit

.. kernel-doc:: drivers/gpu/drm/amd/include/kgd_pp_interface.h
   :identifiers: pp_power_limit_level
-------------END-------------

* Setup
 cd ~/workspace/linux
 . sphinx_2.4.4/bin/activate

* Build
 export SPHINXDOCLOG=sphinx.build.log
 cp $SPHINXDOCLOG{,.old}
 time make -j 8 htmldocs |& tee $SPHINXDOCLOG

* View
 firefox file:///home/dapowell/workspace/linux/Documentation/output/gpu/amdgpu.html

Darren Powell (5):
  amdgpu/pm: reorder definition of swsmu_pm_funcs for readability
  amdgpu/pm: simplify logic of smu_get_power_level
  amdgpu/pm: modify Powerplay API get_power_limit to use
    pp_power_limit_level
  amdgpu/pm: modify smu_get_power_limit to implement Powerplay API
  amdgpu/pm: add kernel documentation for smu_get_power_limit

 .../gpu/drm/amd/include/kgd_pp_interface.h    |  36 +++++-
 drivers/gpu/drm/amd/pm/amdgpu_pm.c            |  61 +++++-----
 drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h       |   5 +-
 .../gpu/drm/amd/pm/powerplay/amd_powerplay.c  |  29 +++--
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c     | 110 ++++++++++++------
 5 files changed, 159 insertions(+), 82 deletions(-)


base-commit: b1d634be967396d371e620685658224f28ba6247
-- 
2.25.1



More information about the amd-gfx mailing list