diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2023-11-19 00:39:34 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2024-06-20 01:36:48 +0300 |
commit | 032000264cbec9b17af2f76dd2899a7cc20ef422 (patch) | |
tree | 4e1d97ed93d5e03678579e9189e8179f552a5069 /drivers/mailbox/Makefile | |
parent | 41be7fcc5d632402382a7c2a77ac84baf24d47cc (diff) |
media: renesas: vsp1: Add and use function to dump a pipeline to the log
It is useful for debugging purpose to dump a vsp1_pipeline to the kernel
log. Add a new function to do so, and use it when initializing the video
and DRM pipelines.
As __vsp1_pipeline_dump() needs to construct the log message
iteratively, it uses pr_cont(...) (exact equivalent to the more verbose
"printk(KERN_CONT ..."). The function thus can't use dev_dbg() to log
the initial part of the message, for two reasons:
- pr_cont() doesn't seem to work with dev_*(). Even if the format string
passed to dev_*() doesn't end with a '\n', pr_cont() starts a new line
in the log. This behaviour doesn't seem to be clearly documented, and
may or may not be on purpose.
- Messages printed by dev_dbg() may be omitted if dynamic debugging is
enabled. In that case, the continuation messages will still be
printed, leading to confusing log messages.
To still benefit from the dynamic debug infrastructure, we declare a
vsp1_pipeline_dump() macro that uses _dynamic_func_call() when dynamic
debugging is enabled. The whole vsp1_pipeline_dump() call can be
selected at runtime. The __vsp1_pipeline_dump() function then uses a
plain "printk(KERN_DEBUG ...)" to print the message header using the
debug log level, and pr_cont() to print the rest of the message on the
same line.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
Diffstat (limited to 'drivers/mailbox/Makefile')
0 files changed, 0 insertions, 0 deletions