Hi Maxime,
> Bridges have some fields in their state worth printing, but we don't
> provide an atomic_print_state implementation to show those fields.
>
> Provide one.
>
> Reviewed-by: Laurent Pinchart <[email protected]>
> Signed-off-by: Maxime Ripard <[email protected]>
Thanks for your patch, which is now commit 4a7a146f1cc6791a
("drm/bridge: Implement atomic_print_state") in drm-misc/for-linux-next.
> --- a/drivers/gpu/drm/drm_bridge.c
> +++ b/drivers/gpu/drm/drm_bridge.c
> @@ -548,14 +548,35 @@ drm_bridge_atomic_create_priv_state(struct
> drm_private_obj *obj)
> return ERR_CAST(state);
>
> return &state->base;
> }
>
> +static void
> +drm_bridge_atomic_print_priv_state(struct drm_printer *p,
> + const struct drm_private_state *s)
> +{
> + const struct drm_bridge_state *state = drm_priv_to_bridge_state(s);
warning: passing argument 1 of ‘drm_priv_to_bridge_state’ discards ‘const’
qualifier from pointer target type [-Wdiscarded-qualifiers]
Apparently you lost "[PATCH v2 4/28] drm/atomic: Convert
drm_priv_to_bridge_state to container_of_const"[1] along the way?
> + struct drm_bridge *bridge = drm_priv_to_bridge(s->obj);
> +
> + if (bridge->of_node)
> + drm_printf(p, "bridge: %ps (%pOFfc)\n", bridge->funcs,
> bridge->of_node);
> + else
> + drm_printf(p, "bridge: %ps\n", bridge->funcs);
> +
> + drm_printf_indent(p, 1, "input bus configuration:");
> + drm_printf_indent(p, 2, "code: %04x", state->input_bus_cfg.format);
> + drm_printf_indent(p, 2, "flags: %08x", state->input_bus_cfg.flags);
> + drm_printf_indent(p, 1, "output bus configuration:");
> + drm_printf_indent(p, 2, "code: %04x", state->output_bus_cfg.format);
> + drm_printf_indent(p, 2, "flags: %08x", state->output_bus_cfg.flags);
> +}
> +
[1]
https://lore.kernel.org/[email protected]
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds