Re: [PATCH] drm/msm/snapshot: fix dumping of the unaligned regions
From: Dmitry Baryshkov
Date: Sat May 16 2026 - 07:34:14 EST
On Sat, May 16, 2026 at 12:40:10AM +0300, Dmitry Baryshkov wrote:
> The snapshotting code internally aligns data segment to 16 bytes. This
> works fine for DPU code (where most of the regions are aligned), but
> fails for snapshotting of the DSI data (because DSI data region is
> shifted by 4 bytes). Fix the code by removing length alignment and by
> accurately printing last registers in the region. While reworking the
> code also fix the 16x memory overallocation in
> msm_disp_state_dump_regs().
>
> Fixes: 98659487b845 ("drm/msm: add support to take dpu snapshot")
> Reported-by: Salendarsingh Gaud <sgaud@xxxxxxxxxxxxxxxx>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
> ---
> drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c | 27 ++++++++++++++++++-----
> 1 file changed, 21 insertions(+), 6 deletions(-)
>
> @@ -172,6 +184,9 @@ void msm_disp_snapshot_add_block(struct msm_disp_state *disp_state, u32 len,
> struct va_format vaf;
> va_list va;
>
> + if (strcmp(fmt, "dsi%d_ctrl"))
> + return;
> +
And this is a debugging change, which I forgot to remove. I'll send v2.
> new_blk = kzalloc_obj(struct msm_disp_state_block);
> if (!new_blk)
> return;
--
With best wishes
Dmitry