]> git.baikalelectronics.ru Git - kernel.git/commit
drm_print: add _ddebug descriptor to drm_*dbg prototypes
authorJim Cromie <jim.cromie@gmail.com>
Mon, 12 Sep 2022 05:28:52 +0000 (23:28 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Sep 2022 13:02:02 +0000 (15:02 +0200)
commitccfae49f419800eba113d9fb0163795ecce98b24
treefa26017d5c7673e0d7cdc7f79ac0114b30f4b5fc
parent89ed2cf383549a17b72a0d9a1b8ade4e421b1439
drm_print: add _ddebug descriptor to drm_*dbg prototypes

upgrade the callchain to drm_dbg() and drm_dev_dbg(); add a struct
_ddebug ptr parameter to them, and supply that additional param by
replacing the '_no_desc' flavor of dyndbg Factory macro currently used
with the flavor that supplies the descriptor.

NOTES:

The descriptor gives these fns access to the decorator flags, but they
do none of the dynamic-prefixing done by dynamic_emit_prefix(), which
is currently static.

DRM already has conventions for logging/messaging; just tossing
optional decorations on top probably wouldn't help.  Instead, existing
flags (or new ones, perhaps 'sd' ala lspci) can be used to make
current message conventions optional.  This suggests a new
drmdbg_prefix_emit() to handle prefixing locally.

For CONFIG_DRM_USE_DYNAMIC_DEBUG=N, just pass null descriptor.

desc->class_id is redundant with category parameter, but its
availability is dependent on desc.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Link: https://lore.kernel.org/r/20220912052852.1123868-10-jim.cromie@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/drm_print.c
include/drm/drm_print.h