I think I am done reworking the series and getting to a point where I think it is basically finished. The configuration of the slots could be improved later on when working on dynamic reclocking, but for now it's good enough to report the current GPU utilization to userspace.
Patches 1-4 imeplement PMU commands to setup and readout the counters. Patches 5-6 lets Nouveau make use of 1-4. Patch 7 adds a debugfs file to readout basic GPU loads. In a follow up one could write a nice NVIF based interface for readoung out those values to provide them through GALLIUM_HUD. This feature is required to implement proper dynamic reclocking on GT215 and newer. On pre GT215 GPUs there is also PCOUNTERS, but this is ugly so that I only focus on dynamic reclocking starting with GT215 for now. Karol Herbst (7): pmu/fuc: add macros for pmu engine counters pmu/fuc: read out counters and store them pmu/fuc: implement GET_SLOTS pmu/fuc: implement SET_SLOT pmu: add counter_slots field pmu: setup counters nouveau/debugfs: add interface for current load drm/nouveau/include/nvif/device.h | 1 + drm/nouveau/include/nvkm/subdev/pmu.h | 17 + drm/nouveau/nouveau_debugfs.c | 27 + drm/nouveau/nvkm/subdev/pmu/base.c | 8 + drm/nouveau/nvkm/subdev/pmu/fuc/gf100.fuc3.h | 838 ++++++++++++++++----------- drm/nouveau/nvkm/subdev/pmu/fuc/gf119.fuc4.h | 780 +++++++++++++++---------- drm/nouveau/nvkm/subdev/pmu/fuc/gk208.fuc5.h | 732 +++++++++++++---------- drm/nouveau/nvkm/subdev/pmu/fuc/gt215.fuc3.h | 736 +++++++++++++---------- drm/nouveau/nvkm/subdev/pmu/fuc/macros.fuc | 8 + drm/nouveau/nvkm/subdev/pmu/fuc/os.h | 16 + drm/nouveau/nvkm/subdev/pmu/fuc/perf.fuc | 156 +++++ drm/nouveau/nvkm/subdev/pmu/gf100.c | 2 + drm/nouveau/nvkm/subdev/pmu/gf119.c | 2 + drm/nouveau/nvkm/subdev/pmu/gk104.c | 2 + drm/nouveau/nvkm/subdev/pmu/gk110.c | 2 + drm/nouveau/nvkm/subdev/pmu/gk208.c | 2 + drm/nouveau/nvkm/subdev/pmu/gm107.c | 2 + drm/nouveau/nvkm/subdev/pmu/gt215.c | 62 ++ drm/nouveau/nvkm/subdev/pmu/priv.h | 5 + 19 files changed, 2137 insertions(+), 1261 deletions(-) -- 2.13.0 _______________________________________________ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau