[Freedreno] [PATCH 1/2] drm/msm/dpu: add dpu_crtc_atomic_print_state
Abhinav Kumar
quic_abhinavk at quicinc.com
Thu Dec 16 01:11:48 UTC 2021
On 12/15/2021 8:09 AM, Dmitry Baryshkov wrote:
> Implement CRTC's atomic_print_state() callback, printing DPU-specific
> CRTC state (LM, CTL and DSPP ids).
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov at linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk at quicinc.com>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> index 59b1bcfbe8c0..df128a680697 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> @@ -924,6 +924,20 @@ static struct drm_crtc_state *dpu_crtc_duplicate_state(struct drm_crtc *crtc)
> return &cstate->base;
> }
>
> +static void dpu_crtc_atomic_print_state(struct drm_printer *p,
> + const struct drm_crtc_state *state)
> +{
> + struct dpu_crtc_state *cstate = to_dpu_crtc_state(state);
> + int i;
> +
> + for (i = 0; i < cstate->num_mixers; i++) {
> + drm_printf(p, "\tlm[%d]=%d\n", i, cstate->mixers[i].hw_lm->idx - LM_0);
> + drm_printf(p, "\tctl[%d]=%d\n", i, cstate->mixers[i].lm_ctl->idx - CTL_0);
> + if (cstate->mixers[i].hw_dspp)
> + drm_printf(p, "\tdspp[%d]=%d\n", i, cstate->mixers[i].hw_dspp->idx - DSPP_0);
> + }
> +}
> +
> static void dpu_crtc_disable(struct drm_crtc *crtc,
> struct drm_atomic_state *state)
> {
> @@ -1454,6 +1468,7 @@ static const struct drm_crtc_funcs dpu_crtc_funcs = {
> .reset = dpu_crtc_reset,
> .atomic_duplicate_state = dpu_crtc_duplicate_state,
> .atomic_destroy_state = dpu_crtc_destroy_state,
> + .atomic_print_state = dpu_crtc_atomic_print_state,
> .late_register = dpu_crtc_late_register,
> .verify_crc_source = dpu_crtc_verify_crc_source,
> .set_crc_source = dpu_crtc_set_crc_source,
>
More information about the Freedreno
mailing list