drm/msm/gpu: Add per-submission statistics
authorJordan Crouse <jcrouse@codeaurora.org>
Fri, 2 Nov 2018 15:25:20 +0000 (09:25 -0600)
committerRob Clark <robdclark@gmail.com>
Tue, 11 Dec 2018 18:05:28 +0000 (13:05 -0500)
commit568692102b6ad52fae27bef66793bc2e5770e429
tree5138d9f0d069084f08cf723426d8f45a7f50aeb2
parent93f7abf19dad2d0ad3c93597c87bbaff03218cb9
drm/msm/gpu: Add per-submission statistics

Add infrastructure to track statistics for GPU submissions
by sampling certain perfcounters before and after a submission.

To store the statistics, the per-ring memptrs region is
expanded to include room for up to 64 entries - this should
cover a reasonable amount of inflight submissions without
worrying about losing data. The target specific code inserts
PM4 commands to sample the counters before and after
submission and store them in the data region. The CPU can
access the data after the submission retires to make sense
of the statistics and communicate them to the user.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/adreno/a6xx_gmu.c
drivers/gpu/drm/msm/adreno/a6xx_gpu.c
drivers/gpu/drm/msm/msm_ringbuffer.h