@@ -63,11 +63,10 @@ void drm_printf(struct drm_printer *p, const char *f, ...)
}
EXPORT_SYMBOL(drm_printf);
-#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,
- const char *prefix, const char *format, ...)
+ const char *prefix, const char *driver,
+ const char *format, ...)
{
struct va_format vaf;
va_list args;
@@ -80,10 +79,11 @@ void drm_dev_printk(const struct device *dev, const char *level,
vaf.va = &args;
if (dev)
- dev_printk(level, dev, DRM_PRINTK_FMT, function_name, prefix,
- &vaf);
+ dev_printk(level, dev, "[%s:%s]%s %pV", driver, function_name,
+ prefix, &vaf);
else
- printk("%s" DRM_PRINTK_FMT, level, function_name, prefix, &vaf);
+ printk("%s[%s:%s]%s %pV", level, driver, function_name, prefix,
+ &vaf);
va_end(args);
}
@@ -203,10 +203,11 @@ static inline struct drm_printer drm_debug_printer(const char *prefix)
#define DRM_UT_STATE 0x40
#define DRM_UT_LEASE 0x80
-__printf(6, 7)
+__printf(7, 8)
void drm_dev_printk(const struct device *dev, const char *level,
unsigned int category, const char *function_name,
- const char *prefix, const char *format, ...);
+ const char *prefix, const char *driver, const char *format,
+ ...);
__printf(4, 5)
void drm_printk(const char *level, unsigned int category, const char *driver,
const char *format, ...);
@@ -241,7 +242,7 @@ void drm_printk(const char *level, unsigned int category, const char *driver,
*/
#define DRM_DEV_ERROR(dev, fmt, ...) \
drm_dev_printk(dev, KERN_ERR, DRM_UT_NONE, __func__, " *ERROR*",\
- fmt, ##__VA_ARGS__)
+ DRM_LOG_NAME, fmt, ##__VA_ARGS__)
#define DRM_ERROR(fmt, ...) \
drm_printk(KERN_ERR, DRM_UT_NONE, DRM_LOG_NAME, fmt, ##__VA_ARGS__)
@@ -264,8 +265,8 @@ void drm_printk(const char *level, unsigned int category, const char *driver,
DRM_DEV_ERROR_RATELIMITED(NULL, fmt, ##__VA_ARGS__)
#define DRM_DEV_INFO(dev, fmt, ...) \
- drm_dev_printk(dev, KERN_INFO, DRM_UT_NONE, __func__, "", fmt, \
- ##__VA_ARGS__)
+ drm_dev_printk(dev, KERN_INFO, DRM_UT_NONE, __func__, "", \
+ DRM_LOG_NAME, fmt, ##__VA_ARGS__)
#define DRM_DEV_INFO_ONCE(dev, fmt, ...) \
({ \
@@ -283,38 +284,38 @@ void drm_printk(const char *level, unsigned int category, const char *driver,
* @fmt: printf() like format string.
*/
#define DRM_DEV_DEBUG(dev, fmt, args...) \
- drm_dev_printk(dev, KERN_DEBUG, DRM_UT_CORE, __func__, "", fmt, \
- ##args)
+ drm_dev_printk(dev, KERN_DEBUG, DRM_UT_CORE, __func__, "", \
+ DRM_LOG_NAME, fmt, ##args)
#define DRM_DEBUG(fmt, ...) \
drm_printk(KERN_DEBUG, DRM_UT_CORE, DRM_LOG_NAME, fmt, ##__VA_ARGS__)
#define DRM_DEV_DEBUG_DRIVER(dev, fmt, args...) \
drm_dev_printk(dev, KERN_DEBUG, DRM_UT_DRIVER, __func__, "", \
- fmt, ##args)
+ DRM_LOG_NAME, fmt, ##args)
#define DRM_DEBUG_DRIVER(fmt, ...) \
drm_printk(KERN_DEBUG, DRM_UT_DRIVER, DRM_LOG_NAME, fmt, ##__VA_ARGS__)
#define DRM_DEV_DEBUG_KMS(dev, fmt, args...) \
- drm_dev_printk(dev, KERN_DEBUG, DRM_UT_KMS, __func__, "", fmt, \
- ##args)
+ drm_dev_printk(dev, KERN_DEBUG, DRM_UT_KMS, __func__, "", \
+ DRM_LOG_NAME, fmt, ##args)
#define DRM_DEBUG_KMS(fmt, ...) \
drm_printk(KERN_DEBUG, DRM_UT_KMS, DRM_LOG_NAME, fmt, ##__VA_ARGS__)
#define DRM_DEV_DEBUG_PRIME(dev, fmt, args...) \
drm_dev_printk(dev, KERN_DEBUG, DRM_UT_PRIME, __func__, "", \
- fmt, ##args)
+ DRM_LOG_NAME, fmt, ##args)
#define DRM_DEBUG_PRIME(fmt, ...) \
drm_printk(KERN_DEBUG, DRM_UT_PRIME, DRM_LOG_NAME, fmt, ##__VA_ARGS__)
#define DRM_DEV_DEBUG_ATOMIC(dev, fmt, args...) \
drm_dev_printk(dev, KERN_DEBUG, DRM_UT_ATOMIC, __func__, "", \
- fmt, ##args)
+ DRM_LOG_NAME, fmt, ##args)
#define DRM_DEBUG_ATOMIC(fmt, ...) \
drm_printk(KERN_DEBUG, DRM_UT_ATOMIC, DRM_LOG_NAME, fmt, ##__VA_ARGS__)
#define DRM_DEV_DEBUG_VBL(dev, fmt, args...) \
- drm_dev_printk(dev, KERN_DEBUG, DRM_UT_VBL, __func__, "", fmt, \
- ##args)
+ drm_dev_printk(dev, KERN_DEBUG, DRM_UT_VBL, __func__, "" \
+ DRM_LOG_NAME, fmt, ##args)
#define DRM_DEBUG_VBL(fmt, ...) \
drm_printk(KERN_DEBUG, DRM_UT_VBL, DRM_LOG_NAME, fmt, ##__VA_ARGS__)
@@ -328,7 +329,7 @@ void drm_printk(const char *level, unsigned int category, const char *driver,
DEFAULT_RATELIMIT_BURST); \
if (__ratelimit(&_rs)) \
drm_dev_printk(dev, KERN_DEBUG, DRM_UT_ ## level, \
- __func__, "", fmt, ##args); \
+ __func__, "", DRM_LOG_NAME, fmt, ##args);\
})
/**