diff options
author | Jordan Crouse <jcrouse@codeaurora.org> | 2018-07-24 19:33:24 +0300 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2018-07-30 15:49:45 +0300 |
commit | e00e473d9817e03cddbaf181a491c42ae8373482 (patch) | |
tree | 9637b302c3de0065110d7be403cb63e6d78daeb5 /drivers/gpu/drm/msm/msm_gpu.h | |
parent | 5dc634bdbfd6dd9bdf98bce0d6f64878e1d47b1f (diff) | |
download | linux-e00e473d9817e03cddbaf181a491c42ae8373482.tar.xz |
drm/msm/gpu: Capture the state of the GPU
Add the infrastructure to capture the current state of the GPU and
store it in memory so that it can be dumped later.
For now grab the same basic ringbuffer information and registers
that are provided by the debugfs 'gpu' node but obviously this should
be extended to capture a much larger set of GPU information.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gpu.h')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gpu.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_gpu.h b/drivers/gpu/drm/msm/msm_gpu.h index b8241179175a..de71cc04ecf3 100644 --- a/drivers/gpu/drm/msm/msm_gpu.h +++ b/drivers/gpu/drm/msm/msm_gpu.h @@ -27,6 +27,7 @@ struct msm_gem_submit; struct msm_gpu_perfcntr; +struct msm_gpu_state; struct msm_gpu_config { const char *ioname; @@ -69,6 +70,8 @@ struct msm_gpu_funcs { int (*debugfs_init)(struct msm_gpu *gpu, struct drm_minor *minor); #endif int (*gpu_busy)(struct msm_gpu *gpu, uint64_t *value); + struct msm_gpu_state *(*gpu_state_get)(struct msm_gpu *gpu); + void (*gpu_state_put)(struct msm_gpu_state *state); }; struct msm_gpu { @@ -175,6 +178,23 @@ struct msm_gpu_submitqueue { struct kref ref; }; +struct msm_gpu_state { + struct timeval time; + + struct { + u64 iova; + u32 fence; + u32 seqno; + u32 rptr; + u32 wptr; + } ring[MSM_GPU_MAX_RINGS]; + + int nr_registers; + u32 *registers; + + u32 rbbm_status; +}; + static inline void gpu_write(struct msm_gpu *gpu, u32 reg, u32 data) { msm_writel(data, gpu->mmio + (reg << 2)); |