Skip to content

Commit 857548c

Browse files
committed
drm/msm/disp: Tweak display snapshot to match gpu snapshot
Add UTS_RELEASE and show timestamp the same way for consistency. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Rob Clark <[email protected]>
1 parent 8ecfef9 commit 857548c

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

drivers/gpu/drm/msm/disp/msm_disp_snapshot.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
* @dev: device pointer
4040
* @drm_dev: drm device pointer
4141
* @atomic_state: atomic state duplicated at the time of the error
42-
* @timestamp: timestamp at which the coredump was captured
42+
* @time: timestamp at which the coredump was captured
4343
*/
4444
struct msm_disp_state {
4545
struct device *dev;
@@ -49,7 +49,7 @@ struct msm_disp_state {
4949

5050
struct drm_atomic_state *atomic_state;
5151

52-
ktime_t timestamp;
52+
struct timespec64 time;
5353
};
5454

5555
/**

drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
#define pr_fmt(fmt) "[drm:%s:%d] " fmt, __func__, __LINE__
77

8+
#include <generated/utsrelease.h>
9+
810
#include "msm_disp_snapshot.h"
911

1012
static void msm_disp_state_dump_regs(u32 **reg, u32 aligned_len, void __iomem *base_addr)
@@ -79,10 +81,11 @@ void msm_disp_state_print(struct msm_disp_state *state, struct drm_printer *p)
7981
}
8082

8183
drm_printf(p, "---\n");
82-
84+
drm_printf(p, "kernel: " UTS_RELEASE "\n");
8385
drm_printf(p, "module: " KBUILD_MODNAME "\n");
8486
drm_printf(p, "dpu devcoredump\n");
85-
drm_printf(p, "timestamp %lld\n", ktime_to_ns(state->timestamp));
87+
drm_printf(p, "time: %lld.%09ld\n",
88+
state->time.tv_sec, state->time.tv_nsec);
8689

8790
list_for_each_entry_safe(block, tmp, &state->blocks, node) {
8891
drm_printf(p, "====================%s================\n", block->name);
@@ -100,7 +103,7 @@ static void msm_disp_capture_atomic_state(struct msm_disp_state *disp_state)
100103
struct drm_device *ddev;
101104
struct drm_modeset_acquire_ctx ctx;
102105

103-
disp_state->timestamp = ktime_get();
106+
ktime_get_real_ts64(&disp_state->time);
104107

105108
ddev = disp_state->drm_dev;
106109

0 commit comments

Comments
 (0)