@@ -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_NAME "] %pV", vaf);
+ dev_info(p->arg, "[" DRM_LOG_NAME "] %pV", vaf);
}
EXPORT_SYMBOL(__drm_printfn_info);
@@ -63,7 +63,7 @@ void drm_printf(struct drm_printer *p, const char *f, ...)
}
EXPORT_SYMBOL(drm_printf);
-#define DRM_PRINTK_FMT "[" DRM_NAME ":%s]%s %pV"
+#define DRM_PRINTK_FMT "[" DRM_LOG_NAME ":%s]%s %pV"
void drm_dev_printk(const struct device *dev, const char *level,
unsigned int category, const char *function_name,
@@ -102,7 +102,7 @@ void drm_printk(const char *level, unsigned int category,
vaf.fmt = format;
vaf.va = &args;
- printk("%s" "[" DRM_NAME ":%ps]%s %pV",
+ printk("%s" "[" DRM_LOG_NAME ":%ps]%s %pV",
level, __builtin_return_address(0),
strcmp(level, KERN_ERR) == 0 ? " *ERROR*" : "", &vaf);
@@ -94,7 +94,7 @@ __i915_printk(struct drm_i915_private *dev_priv, const char *level,
vaf.fmt = fmt;
vaf.va = &args;
- dev_printk(level, kdev, "[" DRM_NAME ":%ps] %pV",
+ dev_printk(level, kdev, "[" DRM_LOG_NAME ":%ps] %pV",
__builtin_return_address(0), &vaf);
if (is_error && !shown_bug_once) {
@@ -60,6 +60,13 @@
* }
*/
+/**
+ * String output in log messages - can be overriden by driver code.
+ */
+#ifndef DRM_LOG_NAME
+#define DRM_LOG_NAME "drm"
+#endif
+
/**
* struct drm_printer - drm output "stream"
*
@@ -208,7 +215,7 @@ void drm_printk(const char *level, unsigned int category,
#define _DRM_PRINTK(once, level, fmt, ...) \
do { \
- printk##once(KERN_##level "[" DRM_NAME "] " fmt, \
+ printk##once(KERN_##level "[" DRM_LOG_NAME "] " fmt, \
##__VA_ARGS__); \
} while (0)
@@ -69,7 +69,7 @@ typedef unsigned long drm_handle_t;
extern "C" {
#endif
-#define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */
+#define DRM_NAME "drm" /**< Deprecated. */
#define DRM_MIN_ORDER 5 /**< At least 2^5 bytes = 32 bytes */
#define DRM_MAX_ORDER 22 /**< Up to 2^22 bytes = 4MB */
#define DRM_RAM_PERCENT 10 /**< How much system ram can we lock? */