Skip to content

Commit 53b5333

Browse files
lumagrobclark
authored andcommitted
drm/msm/dpu: add dpu_crtc_atomic_print_state
Implement CRTC's atomic_print_state() callback, printing DPU-specific CRTC state (LM, CTL and DSPP ids). Signed-off-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Link: https://lore.kernel.org/r/[email protected] [DB: marked cstate as const] Signed-off-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Rob Clark <[email protected]>
1 parent 48d0cf4 commit 53b5333

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,20 @@ static struct drm_crtc_state *dpu_crtc_duplicate_state(struct drm_crtc *crtc)
924924
return &cstate->base;
925925
}
926926

927+
static void dpu_crtc_atomic_print_state(struct drm_printer *p,
928+
const struct drm_crtc_state *state)
929+
{
930+
const struct dpu_crtc_state *cstate = to_dpu_crtc_state(state);
931+
int i;
932+
933+
for (i = 0; i < cstate->num_mixers; i++) {
934+
drm_printf(p, "\tlm[%d]=%d\n", i, cstate->mixers[i].hw_lm->idx - LM_0);
935+
drm_printf(p, "\tctl[%d]=%d\n", i, cstate->mixers[i].lm_ctl->idx - CTL_0);
936+
if (cstate->mixers[i].hw_dspp)
937+
drm_printf(p, "\tdspp[%d]=%d\n", i, cstate->mixers[i].hw_dspp->idx - DSPP_0);
938+
}
939+
}
940+
927941
static void dpu_crtc_disable(struct drm_crtc *crtc,
928942
struct drm_atomic_state *state)
929943
{
@@ -1458,6 +1472,7 @@ static const struct drm_crtc_funcs dpu_crtc_funcs = {
14581472
.reset = dpu_crtc_reset,
14591473
.atomic_duplicate_state = dpu_crtc_duplicate_state,
14601474
.atomic_destroy_state = dpu_crtc_destroy_state,
1475+
.atomic_print_state = dpu_crtc_atomic_print_state,
14611476
.late_register = dpu_crtc_late_register,
14621477
.verify_crc_source = dpu_crtc_verify_crc_source,
14631478
.set_crc_source = dpu_crtc_set_crc_source,

0 commit comments

Comments
 (0)