mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-08 18:57:22 +00:00
drm/amdgpu: add sysfs for Peak Tops Limiter (PTL)
Add per-GPU sysfs files under /sys/class/drm/cardX/device/ptl to
control the Peak Tops Limiter (PTL) feature. Exposes ptl_enable
(enable/disable PTL), ptl_format (set/query preferred formats),
and ptl_supported_formats (list supported formats)
Example usage
-------------
Query PTL status:
`cat /sys/class/drm/card1/device/ptl/ptl_enable`
Enable PTL:
`sudo bash -c "echo 1 > /sys/class/drm/card1/device/ptl/ptl_enable"`
Disable PTL:
`sudo bash -c "echo 0 > /sys/class/drm/card1/device/ptl/ptl_enable"`
Set PTL preferred formats:
`sudo bash -c "echo I8,F32 > /sys/class/drm/card1/device/ptl/ptl_format"`
Query supported formats:
`cat /sys/class/drm/card1/device/ptl/ptl_supported_formats`
v3 changes:
* move N/A to previous format in format show(Alex)
* fix format check for format store(Alex)
* drop the ptl declarations into amdgpu_ptl.h(Alex)
v2 changes:
* add usage commands in commit info (Alex)
* move amdgpu_ptl_fmt into kgd_kfd_interface.h (Alex)
Signed-off-by: Perry Yuan <perry.yuan@amd.com>
Reviewed-by: Yifan Zhang <yifan1.zhang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
aa86e750d0
commit
d51a043935
3 changed files with 200 additions and 0 deletions
Loading…
Add table
Add a link
Reference in a new issue