Commit 7739b1e7 authored by Huang Rui's avatar Huang Rui Committed by Alex Deucher

drm/amd/powerplay: add prefix for all powerplay pr_* prints

Powerplay will use them instead of raw printk, and we can dynamic
change the debug level with it.

The prefix is like below:

[  xxx.xxxxxx] amdgpu: [powerplay] ...
Suggested-by: default avatarGrazvydas Ignotas <notasas@gmail.com>
Signed-off-by: default avatarHuang Rui <ray.huang@amd.com>
Cc: Arindam Nath <Arindam.Nath@amd.com>
Reviewed-by: default avatarEdward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 5c964221
...@@ -24,6 +24,12 @@ ...@@ -24,6 +24,12 @@
#ifndef PP_DEBUG_H #ifndef PP_DEBUG_H
#define PP_DEBUG_H #define PP_DEBUG_H
#ifdef pr_fmt
#undef pr_fmt
#endif
#define pr_fmt(fmt) "amdgpu: [powerplay] " fmt
#include <linux/types.h> #include <linux/types.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/slab.h> #include <linux/slab.h>
...@@ -31,7 +37,7 @@ ...@@ -31,7 +37,7 @@
#define PP_ASSERT_WITH_CODE(cond, msg, code) \ #define PP_ASSERT_WITH_CODE(cond, msg, code) \
do { \ do { \
if (!(cond)) { \ if (!(cond)) { \
printk("%s\n", msg); \ pr_warning("%s\n", msg); \
code; \ code; \
} \ } \
} while (0) } while (0)
...@@ -39,7 +45,7 @@ ...@@ -39,7 +45,7 @@
#define PP_DBG_LOG(fmt, ...) \ #define PP_DBG_LOG(fmt, ...) \
do { \ do { \
if(0)printk(KERN_INFO "[ pp_dbg ] " fmt, ##__VA_ARGS__); \ pr_debug(fmt, ##__VA_ARGS__); \
} while (0) } while (0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment