[PATCH v5 6/6] drm/msm/dpu: Update dev core dump to dump registers of sub-blocks
Dmitry Baryshkov
dmitry.baryshkov at linaro.org
Sat Jul 8 01:57:33 UTC 2023
On 08/07/2023 04:24, Ryan McCann wrote:
> Currently, the device core dump mechanism does not dump registers of
> sub-blocks within the DSPP, SSPP, DSC, and PINGPONG blocks. Edit
> dpu_kms_mdp_snapshot function to account for sub-blocks.
>
> Signed-off-by: Ryan McCann <quic_rmccann at quicinc.com>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 66 +++++++++++++++++++++++++++------
> 1 file changed, 54 insertions(+), 12 deletions(-)
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov at linaro.org>
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> index 7a2787279ba0..f7199a5c45ab 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
> @@ -890,6 +890,7 @@ static void dpu_kms_mdp_snapshot(struct msm_disp_state *disp_state, struct msm_k
> int i;
> struct dpu_kms *dpu_kms;
> const struct dpu_mdss_cfg *cat;
> + void __iomem *base;
>
> dpu_kms = to_dpu_kms(kms);
>
> @@ -903,9 +904,16 @@ static void dpu_kms_mdp_snapshot(struct msm_disp_state *disp_state, struct msm_k
> dpu_kms->mmio + cat->ctl[i].base, cat->ctl[i].name);
>
> /* dump DSPP sub-blocks HW regs info */
> - for (i = 0; i < cat->dspp_count; i++)
> - msm_disp_snapshot_add_block(disp_state, cat->dspp[i].len,
> - dpu_kms->mmio + cat->dspp[i].base, cat->dspp[i].name);
> + for (i = 0; i < cat->dspp_count; i++) {
> + base = dpu_kms->mmio + cat->dspp[i].base;
> + msm_disp_snapshot_add_block(disp_state, cat->dspp[i].len, base, cat->dspp[i].name);
> +
> + if (cat->dspp[i].sblk && cat->dspp[i].sblk->pcc.len > 0)
> + msm_disp_snapshot_add_block(disp_state, cat->dspp[i].sblk->pcc.len,
> + base + cat->dspp[i].sblk->pcc.base, "%s_%s",
> + cat->dspp[i].name,
> + cat->dspp[i].sblk->pcc.name);
Nit (no need to resend to correct this): the "%s_%s" logically fits the
next line, as it it related to the names rather than base address.
> + }
>
> /* dump INTF sub-blocks HW regs info */
> for (i = 0; i < cat->intf_count; i++)
--
With best wishes
Dmitry
More information about the dri-devel
mailing list