diff --git a/drivers/gpu/nvgpu/common/fifo/channel.c b/drivers/gpu/nvgpu/common/fifo/channel.c index 932dd840f..a73558b86 100644 --- a/drivers/gpu/nvgpu/common/fifo/channel.c +++ b/drivers/gpu/nvgpu/common/fifo/channel.c @@ -2595,7 +2595,6 @@ void nvgpu_channel_debug_dump_all(struct gk20a *g, nvgpu_kfree(g, info); } } - gk20a_debug_output(o, " "); nvgpu_kfree(g, infos); } diff --git a/drivers/gpu/nvgpu/include/nvgpu/linux/log.h b/drivers/gpu/nvgpu/include/nvgpu/linux/log.h index b66ce6102..705b139a3 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/linux/log.h +++ b/drivers/gpu/nvgpu/include/nvgpu/linux/log.h @@ -56,6 +56,28 @@ void nvgpu_log_dbg_impl(struct gk20a *g, u64 log_mask, #define nvgpu_info_impl(g, fmt, arg...) \ nvgpu_log_msg_impl(g, __func__, __LINE__, NVGPU_INFO, fmt, ##arg) +/** + * nvgpu_dbg_dump_impl - Print part of a debug dump. + * + * @g - The GPU. + * @str - A debug message. + * + * Print a component of a debug message. Typically the err, warning, and + * info prints have a bunch of information about the location of the call. + * For example on Linux: + * + * nvgpu: 17000000.gv11b nvgpu_rc_mmu_fault:296 [ERR] + * + * But, for debug dumps this information is completely useless and + * redundant. This also slows down the UART terminal significantly. + * Note that this function does not take a format and subsequent args. In + * our current model the formatting happens a layer above this function + * call. + * + * This variant prints only a small prefix (to aid in grepping logs). + */ +void nvgpu_dbg_dump_impl(struct gk20a *g, const char *str); + /* * Deprecated API. Do not use!! */ @@ -68,4 +90,4 @@ void nvgpu_log_dbg_impl(struct gk20a *g, u64 log_mask, } \ } while (false) -#endif \ No newline at end of file +#endif diff --git a/drivers/gpu/nvgpu/os/linux/debug.c b/drivers/gpu/nvgpu/os/linux/debug.c index a10554204..6d2e833f6 100644 --- a/drivers/gpu/nvgpu/os/linux/debug.c +++ b/drivers/gpu/nvgpu/os/linux/debug.c @@ -43,7 +43,7 @@ static inline void gk20a_debug_write_printk(void *ctx, const char *str) { struct gk20a *g = ctx; - nvgpu_err(g, str); + nvgpu_dbg_dump_impl(g, str); } static inline void gk20a_debug_write_to_seqfile(void *ctx, const char *str) diff --git a/drivers/gpu/nvgpu/os/linux/log.c b/drivers/gpu/nvgpu/os/linux/log.c index da6c300d9..b9c31b7c2 100644 --- a/drivers/gpu/nvgpu/os/linux/log.c +++ b/drivers/gpu/nvgpu/os/linux/log.c @@ -127,3 +127,8 @@ void nvgpu_log_dbg_impl(struct gk20a *g, u64 log_mask, __nvgpu_really_print_log(g->log_trace, nvgpu_log_name(g), func_name, line, NVGPU_DEBUG, log); } + +void nvgpu_dbg_dump_impl(struct gk20a *g, const char *str) +{ + pr_err("__%s__ %s", g->name, str); +}