Message ID | 20211215174524.1742389-2-robdclark@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/msm: Add display snapshot debugfs | expand |
On Wed, 15 Dec 2021 at 20:49, Rob Clark <robdclark@gmail.com> wrote: > > From: Rob Clark <robdclark@chromium.org> > > Add UTS_RELEASE and show timestamp the same way for consistency. > > Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > --- > drivers/gpu/drm/msm/disp/msm_disp_snapshot.h | 4 ++-- > drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c | 9 ++++++--- > 2 files changed, 8 insertions(+), 5 deletions(-) We should pull this out of disp/, it's no longer disp-specific.
On Wed, Dec 15, 2021 at 11:17 AM Dmitry Baryshkov <dmitry.baryshkov@linaro.org> wrote: > > On Wed, 15 Dec 2021 at 20:49, Rob Clark <robdclark@gmail.com> wrote: > > > > From: Rob Clark <robdclark@chromium.org> > > > > Add UTS_RELEASE and show timestamp the same way for consistency. > > > > Signed-off-by: Rob Clark <robdclark@chromium.org> > > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > > --- > > drivers/gpu/drm/msm/disp/msm_disp_snapshot.h | 4 ++-- > > drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c | 9 ++++++--- > > 2 files changed, 8 insertions(+), 5 deletions(-) > > We should pull this out of disp/, it's no longer disp-specific. Or possibly just move dsi/etc into disp? It is disp specific in the sense that dumping GPU state works quite differently.. BR, -R > > -- > With best wishes > Dmitry
On Wed, 15 Dec 2021 at 23:09, Rob Clark <robdclark@gmail.com> wrote: > > On Wed, Dec 15, 2021 at 11:17 AM Dmitry Baryshkov > <dmitry.baryshkov@linaro.org> wrote: > > > > On Wed, 15 Dec 2021 at 20:49, Rob Clark <robdclark@gmail.com> wrote: > > > > > > From: Rob Clark <robdclark@chromium.org> > > > > > > Add UTS_RELEASE and show timestamp the same way for consistency. > > > > > > Signed-off-by: Rob Clark <robdclark@chromium.org> > > > > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > > > > --- > > > drivers/gpu/drm/msm/disp/msm_disp_snapshot.h | 4 ++-- > > > drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c | 9 ++++++--- > > > 2 files changed, 8 insertions(+), 5 deletions(-) > > > > We should pull this out of disp/, it's no longer disp-specific. > > Or possibly just move dsi/etc into disp? It is disp specific in the > sense that dumping GPU state works quite differently.. Not sure about this. dsi/hdmi/dp seem to be perfect top-level entities. I see your point here, however I'd rather prefer to move mdp4/mdp5/dpu1 out of disp subdir rather than pushing all non-GPU code into disp/ When I tried to move dsi/phy to a separate phy driver, I reworked msm_disp_snapshot by splitting some parts into lib/ code. But I can not say that I completely liked what I did. Partially it was one of the reasons for me not pushing the dsi/phy patchset past RFC.
diff --git a/drivers/gpu/drm/msm/disp/msm_disp_snapshot.h b/drivers/gpu/drm/msm/disp/msm_disp_snapshot.h index 4c619307612c..31ad68be3391 100644 --- a/drivers/gpu/drm/msm/disp/msm_disp_snapshot.h +++ b/drivers/gpu/drm/msm/disp/msm_disp_snapshot.h @@ -39,7 +39,7 @@ * @dev: device pointer * @drm_dev: drm device pointer * @atomic_state: atomic state duplicated at the time of the error - * @timestamp: timestamp at which the coredump was captured + * @time: timestamp at which the coredump was captured */ struct msm_disp_state { struct device *dev; @@ -49,7 +49,7 @@ struct msm_disp_state { struct drm_atomic_state *atomic_state; - ktime_t timestamp; + struct timespec64 time; }; /** diff --git a/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c b/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c index 2e1acb1bc390..5d2ff6791058 100644 --- a/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c +++ b/drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c @@ -5,6 +5,8 @@ #define pr_fmt(fmt) "[drm:%s:%d] " fmt, __func__, __LINE__ +#include <generated/utsrelease.h> + #include "msm_disp_snapshot.h" 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) } drm_printf(p, "---\n"); - + drm_printf(p, "kernel: " UTS_RELEASE "\n"); drm_printf(p, "module: " KBUILD_MODNAME "\n"); drm_printf(p, "dpu devcoredump\n"); - drm_printf(p, "timestamp %lld\n", ktime_to_ns(state->timestamp)); + drm_printf(p, "time: %lld.%09ld\n", + state->time.tv_sec, state->time.tv_nsec); list_for_each_entry_safe(block, tmp, &state->blocks, node) { drm_printf(p, "====================%s================\n", block->name); @@ -100,7 +103,7 @@ static void msm_disp_capture_atomic_state(struct msm_disp_state *disp_state) struct drm_device *ddev; struct drm_modeset_acquire_ctx ctx; - disp_state->timestamp = ktime_get(); + ktime_get_real_ts64(&disp_state->time); ddev = disp_state->drm_dev;