linux/drivers/gpu/drm/amd/pm
Alex Deucher 8cda7a4f96 drm/amdgpu/UAPI: add new CTX OP to get/set stable pstates
Add a new CTX ioctl operation to set stable pstates for profiling.
When creating traces for tools like RGP or using SPM or doing
performance profiling, it's required to enable a special
stable profiling power state on the GPU.  These profiling
states set fixed clocks and disable certain other power
features like powergating which may impact the results.

Historically, these profiling pstates were enabled via sysfs,
but this adds an interface to enable it via the CTX ioctl
from the application.  Since the power state is global
only one application can set it at a time, so if multiple
applications try and use it only the first will get it,
the ioctl will return -EBUSY for others.  The sysfs interface
will override whatever has been set by this interface.

Mesa MR: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/207

v2: don't default r = 0;
v3: rebase on Evan's PM cleanup

Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2022-01-27 15:50:08 -05:00
..
inc drm/amdgpu/UAPI: add new CTX OP to get/set stable pstates 2022-01-27 15:50:08 -05:00
legacy-dpm drm/amd/pm: remove useless if 2022-01-25 18:00:33 -05:00
powerplay drm/amd: Expose the FRU SMU I2C bus 2022-01-27 15:49:48 -05:00
swsmu drm/amdgpu/swsmu/i2c: return an error if the SMU is not running 2022-01-27 15:50:03 -05:00
amdgpu_dpm_internal.c drm/amd/pm: optimize the amdgpu_pm_compute_clocks() implementations 2022-01-14 17:51:14 -05:00
amdgpu_dpm.c drm/amd/pm: fix the deadlock observed on performance_level setting 2022-01-27 15:48:22 -05:00
amdgpu_pm.c drm/amdgpu/UAPI: add new CTX OP to get/set stable pstates 2022-01-27 15:50:08 -05:00
Makefile drm/amd/pm: relocate the power related headers 2022-01-14 17:51:14 -05:00