public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tursulin@ursulin.net>
To: Intel-gfx@lists.freedesktop.org
Cc: David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: [RFC 6/6] drm: Respect driver set DRM_LOG_NAME in drm_info_printer
Date: Wed, 24 Jan 2018 16:18:21 +0000	[thread overview]
Message-ID: <20180124161821.28780-7-tvrtko.ursulin@linux.intel.com> (raw)
In-Reply-To: <20180124161821.28780-1-tvrtko.ursulin@linux.intel.com>

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Same as the previous patch did for drm_printk, allow for the logging
macros to pass in the driver set DRM_LOG_NAME for drm_info_printer.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Gustavo Padovan <gustavo@padovan.org>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
---
 drivers/gpu/drm/drm_print.c | 2 +-
 include/drm/drm_print.h     | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_print.c b/drivers/gpu/drm/drm_print.c
index f97bfcb7d882..1fcc08876f87 100644
--- a/drivers/gpu/drm/drm_print.c
+++ b/drivers/gpu/drm/drm_print.c
@@ -38,7 +38,7 @@ EXPORT_SYMBOL(__drm_printfn_seq_file);
 
 void __drm_printfn_info(struct drm_printer *p, struct va_format *vaf)
 {
-	dev_info(p->arg, "[" DRM_LOG_NAME "] %pV", vaf);
+	dev_info(p->arg, "[%s] %pV", p->prefix, vaf);
 }
 EXPORT_SYMBOL(__drm_printfn_info);
 
diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
index c4dfcd217bce..1f613b49c8f2 100644
--- a/include/drm/drm_print.h
+++ b/include/drm/drm_print.h
@@ -139,6 +139,7 @@ static inline struct drm_printer drm_info_printer(struct device *dev)
 	struct drm_printer p = {
 		.printfn = __drm_printfn_info,
 		.arg = dev,
+		.prefix = DRM_LOG_NAME,
 	};
 	return p;
 }
-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2018-01-24 16:18 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-24 16:18 [RFC v2 0/6] DRM logging tidy Tvrtko Ursulin
2018-01-24 16:18 ` [RFC 1/6] drm/armada: Simplify drm_dev_init error log Tvrtko Ursulin
2018-01-24 17:44   ` Russell King - ARM Linux
2018-01-24 16:18 ` [RFC 2/6] drm: Introduce unexported DRM_LOG_NAME define for logging Tvrtko Ursulin
2018-01-24 16:18 ` [RFC 3/6] drm/i915: Give our log messages our name Tvrtko Ursulin
2018-01-26 13:10   ` [Intel-gfx] " Michal Wajdeczko
2018-01-30 10:53     ` Tvrtko Ursulin
2018-01-24 16:18 ` [RFC 4/6] drm: Respect driver set DRM_LOG_NAME in drm_printk Tvrtko Ursulin
2018-01-24 16:18 ` [RFC 5/6] drm: Respect driver set DRM_LOG_NAME in drm_dev_printk Tvrtko Ursulin
2018-01-24 16:18 ` Tvrtko Ursulin [this message]
2018-01-24 16:23 ` [Intel-gfx] [RFC v2 0/6] DRM logging tidy Chris Wilson
2018-01-24 16:48   ` Tvrtko Ursulin
2018-01-25 11:32     ` Jani Nikula
2018-01-25 13:38       ` [Intel-gfx] " Tvrtko Ursulin
2018-01-24 16:42 ` ✓ Fi.CI.BAT: success for DRM logging tidy (rev2) Patchwork
2018-01-24 20:12 ` ✗ Fi.CI.IGT: warning " Patchwork

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=20180124161821.28780-7-tvrtko.ursulin@linux.intel.com \
    --to=tursulin@ursulin.net \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --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