diff options
author | Jordan Crouse <jcrouse@codeaurora.org> | 2018-07-24 10:33:27 -0600 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2018-07-30 08:49:56 -0400 |
commit | c0fec7f562ec76404ef0f074a89113a703587f3d (patch) | |
tree | d88efd150b3c010d6d1ed8c94f26f347c46228d4 /drivers/gpu/drm/msm/msm_debugfs.c | |
parent | 65a3c2748e882da03102369edb6991e1dd88456e (diff) | |
download | lwn-c0fec7f562ec76404ef0f074a89113a703587f3d.tar.gz lwn-c0fec7f562ec76404ef0f074a89113a703587f3d.zip |
drm/msm/gpu: Capture the GPU state on a GPU hang
Capture the GPU state on a GPU hang and store it for later playback
via the devcoredump facility. Only one crash state is stored at a
time on the assumption that the first hang is usually the most
interesting. The existing crash state can be cleared after capturing
it and then a new one will be captured on the next hang.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_debugfs.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_debugfs.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/msm_debugfs.c b/drivers/gpu/drm/msm/msm_debugfs.c index c3da12179888..f0da0d3c8a80 100644 --- a/drivers/gpu/drm/msm/msm_debugfs.c +++ b/drivers/gpu/drm/msm/msm_debugfs.c @@ -29,6 +29,7 @@ struct msm_gpu_show_priv { static int msm_gpu_show(struct seq_file *m, void *arg) { + struct drm_printer p = drm_seq_file_printer(m); struct msm_gpu_show_priv *show_priv = m->private; struct msm_drm_private *priv = show_priv->dev->dev_private; struct msm_gpu *gpu = priv->gpu; @@ -38,8 +39,8 @@ static int msm_gpu_show(struct seq_file *m, void *arg) if (ret) return ret; - seq_printf(m, "%s Status:\n", gpu->name); - gpu->funcs->show(gpu, show_priv->state, m); + drm_printf(&p, "%s Status:\n", gpu->name); + gpu->funcs->show(gpu, show_priv->state, &p); mutex_unlock(&show_priv->dev->struct_mutex); |