From: Tvrtko Ursulin <tursulin@ursulin.net>
To: Intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Subject: [RFC 0/5] DRM logging tidy
Date: Tue, 6 Dec 2016 18:57:56 +0000 [thread overview]
Message-ID: <1481050681-23416-1-git-send-email-tvrtko.ursulin@linux.intel.com> (raw)
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
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(-)
--
2.7.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2016-12-06 18:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 18:57 Tvrtko Ursulin [this message]
2016-12-06 18:57 ` [RFC 1/5] drm/i915: Give our log messages our name Tvrtko Ursulin
2016-12-06 18:57 ` [RFC 2/5] drm: Respect driver set DRM_NAME in drm_printk Tvrtko Ursulin
2016-12-06 18:57 ` [RFC 3/5] drm: Respect driver set DRM_NAME in drm_dev_printk Tvrtko Ursulin
2016-12-06 18:58 ` [RFC 4/5] drm: Use drm_printk for all logging macros Tvrtko Ursulin
2016-12-06 18:58 ` [RFC 5/5] drm: Do not log driver prefix in debug messages Tvrtko Ursulin
2016-12-06 19:49 ` Gustavo Padovan
2016-12-07 6:52 ` [Intel-gfx] " Tvrtko Ursulin
2016-12-06 19:31 ` ✗ Fi.CI.BAT: failure for DRM logging tidy Patchwork
2016-12-07 17:44 ` [RFC 0/5] " Robert Bragg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1481050681-23416-1-git-send-email-tvrtko.ursulin@linux.intel.com \
--to=tursulin@ursulin.net \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox