Skip to content

RFC DRM logging tidy

Tvrtko Ursulin dri-devel intel-gfx 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5drm/i915: Give our log messages our nameinclude/uapi/drm/i915_drm.h+3 -00 replies
2/5drm: Respect driver set DRM_NAME in drm_printkdrivers/gpu/drm/drm_drv.c include/drm/drmP.h include/drm/drm_drv.h+12 -120 replies
3/5drm: Respect driver set DRM_NAME in drm_dev_printkdrivers/gpu/drm/drm_drv.c drivers/gpu/drm/i915/i915_drv.c include/drm/drmP.h +1 more+31 -290 replies
4/5drm: Use drm_printk for all logging macrosdrivers/gpu/drm/drm_drv.c include/drm/drmP.h+52 -230 replies
5/5drm: Do not log driver prefix in debug messagesdrivers/gpu/drm/drm_drv.c+2 -22 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/5] DRM logging tidy

From: Tvrtko Ursulin <[email protected]>

I wasn't here at the beginnings of DRM so I might have gotten this wrong, however the existance of DRM_NAME suggested to me that the intention was to allow individual drivers to override it and get appropriate prefixes in their log messages.

I can't see that any driver is using it like that but I still thought it would be neat to do that. That way we could have our log messages look more obviously ours. For example after this series we have:

[i915] Memory usable by graphics device = 4096M
[i915] VT-d active for gfx access
[i915] Replacing VGA console driver
[i915] ACPI BIOS requests an excessive sleep of 20000 ms, using 1500 ms instead [i915] Finished loading DMC firmware i915/skl_dmc_ver1_26.bin (v1.26) [i915] Disabling framebuffer compression (FBC) to prevent screen flicker with VT-d enabled [i915] GuC firmware load skipped
[i915] Initialized i915 1.6.0 20161205 for 0000:00:02.0 on minor 0
[i915] DRM_I915_DEBUG enabled
[i915] DRM_I915_DEBUG_GEM enabled
[i915] RC6 on

Previously all that was prefixed with "[drm]" which was OK but I think the above is even better.

Also to consider is that recent drm_printk work has removed (it hardcoded) DRM_NAME from DRM_ERROR and DRM_DEBUG macros, while leaving it with the rest (DRM_INFO, NOTE and WARNING) creating a bit of a inconsistency.

This series also makes all the logging macros use drm_printk, but also makes DRM_NAME passed in from the macro wrappers in all cases. So drivers can override it regardless of the log level.

And finally, the series also removes a bit of redundant data from the debug messages effectively converting this:

[drm:edp_panel_off [i915]] Wait for panel power off time

Into this:

[edp_panel_off [i915]] Wait for panel power off time

Which still has all the data in it.

Tvrtko Ursulin (5):
drm/i915: Give our log messages our name
drm: Respect driver set DRM_NAME in drm_printk
drm: Respect driver set DRM_NAME in drm_dev_printk
drm: Use drm_printk for all logging macros
drm: Do not log driver prefix in debug messages

 drivers/gpu/drm/drm_drv.c       | 39 +++++++++++------
 drivers/gpu/drm/i915/i915_drv.c |  3 +-
 include/drm/drmP.h              | 94 ++++++++++++++++++++++++-----------------
 include/drm/drm_drv.h           | 11 ++---
 include/uapi/drm/i915_drm.h     |  3 ++
 5 files changed, 92 insertions(+), 58 deletions(-)
Signature · 6 lines
2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx