summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index 69528c1f..b27b36d3 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -1108,12 +1108,10 @@ struct gk20a_cyclestate_buffer_elem {
1108 1108
1109#ifdef CONFIG_DEBUG_FS 1109#ifdef CONFIG_DEBUG_FS
1110 /* debug info, default is compiled-in but effectively disabled (0 mask) */ 1110 /* debug info, default is compiled-in but effectively disabled (0 mask) */
1111 #define GK20A_DEBUG
1112 /*e.g: echo 1 > /d/gk20a.0/dbg_mask */ 1111 /*e.g: echo 1 > /d/gk20a.0/dbg_mask */
1113 #define GK20A_DEFAULT_DBG_MASK 0 1112 #define GK20A_DEFAULT_DBG_MASK 0
1114#else 1113#else
1115 /* manually enable and turn it on the mask */ 1114 /* manually enable and turn it on the mask */
1116 /*#define NVGPU_DEBUG*/
1117 #define GK20A_DEFAULT_DBG_MASK (dbg_info) 1115 #define GK20A_DEFAULT_DBG_MASK (dbg_info)
1118#endif 1116#endif
1119 1117
@@ -1141,8 +1139,8 @@ enum gk20a_dbg_categories {
1141 gpu_dbg_mem = BIT(31), /* memory accesses, very verbose */ 1139 gpu_dbg_mem = BIT(31), /* memory accesses, very verbose */
1142}; 1140};
1143 1141
1144#if defined(GK20A_DEBUG)
1145extern u32 gk20a_dbg_mask; 1142extern u32 gk20a_dbg_mask;
1143#ifdef CONFIG_GK20A_TRACE_PRINTK
1146extern u32 gk20a_dbg_ftrace; 1144extern u32 gk20a_dbg_ftrace;
1147#define gk20a_dbg(dbg_mask, format, arg...) \ 1145#define gk20a_dbg(dbg_mask, format, arg...) \
1148do { \ 1146do { \
@@ -1154,14 +1152,14 @@ do { \
1154 __func__, ##arg); \ 1152 __func__, ##arg); \
1155 } \ 1153 } \
1156} while (0) 1154} while (0)
1157 1155#else
1158#else /* GK20A_DEBUG */
1159#define gk20a_dbg(dbg_mask, format, arg...) \ 1156#define gk20a_dbg(dbg_mask, format, arg...) \
1160do { \ 1157do { \
1161 if (0) \ 1158 if (unlikely((dbg_mask) & gk20a_dbg_mask)) { \
1162 pr_info("gk20a %s: " format "\n", __func__, ##arg);\ 1159 pr_info("gk20a %s: " format "\n", \
1160 __func__, ##arg); \
1161 } \
1163} while (0) 1162} while (0)
1164
1165#endif 1163#endif
1166 1164
1167#define gk20a_err(d, fmt, arg...) \ 1165#define gk20a_err(d, fmt, arg...) \