mbox series

[RFC,0/9] drm: add more new-style logging functions

Message ID 20191221095553.13332-1-sam@ravnborg.org (mailing list archive)
Headers show
Series drm: add more new-style logging functions | expand

Message

Sam Ravnborg Dec. 21, 2019, 9:55 a.m. UTC
Jani Nikula introduced the new nice drm_* logging functions.
I looked at updating drm/panel/* to use these,
but was quickly faced with the fact that in
many cases there was a device * but no drm_device *.
And in some cases not even a device *.

So we would end up with a mixture of different type
of logging making it confusing when to use what.
Somethign that alos IMO hurts the readability of the code.

Likewise for review feedback where we cannot simply tell
people to use new style logging but have to explain when
to use what. This will be confusing.

This patchset starts by introducing brief documentation
of the new style logging functions - something I have missed.
And then it introduces new style logging for the remaining
types of logging.

    drm_dev_*	- when a device * is avialable
    drm_pr_*	- when no identification is available

The last patch change the now legacy logging functions to
use the new style logging functions and in the process
delete a few now unused functions.
No conversion of actual users included - that will come
later when we have agreed on namign etc.

The patchset is not yet tested - but it builds.
This is an early drop of the patches to trigger
feedback on naming, get early feedback on documentation,
and any other good comments.

	Sam

Sam Ravnborg (8):
      drm/print: document logging functions
      drm/print: move new style logging functions
      drm/print: add new logging helper for drm logging
      drm/print: add kernel-doc for drm_debug_enabled
      drm/print: rename drm_dev_dbg
      drm/print: add drm_dev_* logging functions
      drm/print: add drm_pr_ logging
      drm/print: let legacy logging use new style functions

 Documentation/gpu/drm-internals.rst |   6 +
 drivers/gpu/drm/drm_print.c         |  80 ------
 include/drm/drm_print.h             | 538 +++++++++++++++++++++++-------------
 3 files changed, 351 insertions(+), 273 deletions(-)