[PATCH v2 0/5] GPU workload hints for better performance
Shashank Sharma
shashank.sharma at amd.com
Mon Sep 26 15:02:47 UTC 2022
AMDGPU SOCs supports dynamic workload based power profiles, which can
provide fine-tuned performance for a particular type of workload.
This patch series adds an interface to set/reset these power profiles
based on the workload type hints. A user can set a hint of workload
type being submistted to GPU, and the driver can dynamically switch
the power profiles which is best suited to this kind of workload.
Currently supported workload profiles are:
"None", "3D", "Video", "VR", "Compute"
V2: This version addresses the review comment from Christian about
chaning the design to set workload mode in a more dynamic method
than during the context creation.
Shashank Sharma (5):
drm/amdgpu: add UAPI for workload hints to ctx ioctl
drm/amdgpu: add new functions to set GPU power profile
drm/amdgpu: set GPU workload via ctx IOCTL
drm/amdgpu: switch GPU workload profile
drm/amdgpu: switch workload context to/from compute
drivers/gpu/drm/amd/amdgpu/Makefile | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 14 ++-
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 56 ++++++++++-
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h | 1 +
.../gpu/drm/amd/amdgpu/amdgpu_ctx_workload.c | 93 +++++++++++++++++++
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 +
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 15 +++
drivers/gpu/drm/amd/amdgpu/amdgpu_job.h | 3 +
.../gpu/drm/amd/include/amdgpu_ctx_workload.h | 54 +++++++++++
drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 5 +
include/uapi/drm/amdgpu_drm.h | 18 ++++
12 files changed, 258 insertions(+), 6 deletions(-)
create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_ctx_workload.c
create mode 100644 drivers/gpu/drm/amd/include/amdgpu_ctx_workload.h
--
2.34.1
More information about the amd-gfx
mailing list