On Fri, Oct 30, 2026 at 2:31 AM Zhu Lingshan <[email protected]> wrote: > > (Add Benjamin's Reviewed-by tag and resend) > > This series implements PMC support for amdgpu. Including two parts: > 1) PMC Enablement > 2) Profiler Reservation > > The user space should take the reservation, then set PMC. > > Changes from v1: > 1) remove per-IP set_mqd_perfcount, use init_mqd with modify == true instead > 2) squash amdgpu_userq_xa_find into the caller patch > 3) keep CWSR registers when modify mqd for GFX12 > 4) minor improvements
The series is: Reviewed-by: Alex Deucher <[email protected]> > > Zhu Lingshan (13): > drm/amdgpu: implement PMC ioctl framework > drm/amdgpu: add device-wide PMC config > drm/amdgpu: introduce PMC ioctl handler > drm/amdgpu: implement reservation mechanism for PMC > drm/amdgpu: set device-wide PMC enablement indicator > drm/amdgpu/gfx11: set mqd->perfcount from mqd_prop > drm/amdgpu/gfx12: set mqd->perfcount from mqd_prop > drm/amdgpu/gfx12.1: set mqd->perfcount from mqd_prop > drm/amdgpu/gfx11: set pmc_supported for GFX11 family > drm/amdgpu/gfx12: set pmc_supported for GFX12 family > drm/amdgpu/gfx12: keep CWSR registers when modify mqd > drm/amdgpu: implement device PMC handler > drm/amdgpu: set userq perf state before publish it > > drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- > drivers/gpu/drm/amd/amdgpu/amdgpu.h | 9 + > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 + > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 + > drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 2 + > drivers/gpu/drm/amd/amdgpu/amdgpu_profiler.c | 183 +++++++++++++++++++ > drivers/gpu/drm/amd/amdgpu/amdgpu_profiler.h | 38 ++++ > drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 164 ++++++++++++++++- > drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h | 2 + > drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 3 + > drivers/gpu/drm/amd/amdgpu/gfx_v12_0.c | 9 +- > drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c | 1 + > include/uapi/drm/amdgpu_drm.h | 36 ++++ > 13 files changed, 451 insertions(+), 5 deletions(-) > create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_profiler.c > create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_profiler.h > > -- > 2.53.0 >
