mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: Update debug crash dump
Update the debug crash dump to be clearer, more concise and avoid many of the misformatting issues that have crept in over the last couple years. This also changes the debug prints to move from pr_err() in the Linux kernel to nvgpu_err(). This makes it easier to filter all nvgpu messages in a log file with a single grep command. Change-Id: I00ca9e6c32da7a79c8f6903a139bf6b43e89618a Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1940515 GVS: Gerrit_Virtual_Submit Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
ac5763eb0c
commit
032b37bee5
@@ -40,7 +40,9 @@ unsigned int gk20a_debug_trace_cmdbuf;
|
||||
static inline void gk20a_debug_write_printk(void *ctx, const char *str,
|
||||
size_t len)
|
||||
{
|
||||
pr_info("%s", str);
|
||||
struct gk20a *g = ctx;
|
||||
|
||||
nvgpu_err(g, str);
|
||||
}
|
||||
|
||||
static inline void gk20a_debug_write_to_seqfile(void *ctx, const char *str,
|
||||
@@ -49,8 +51,7 @@ static inline void gk20a_debug_write_to_seqfile(void *ctx, const char *str,
|
||||
seq_write((struct seq_file *)ctx, str, len);
|
||||
}
|
||||
|
||||
void gk20a_debug_output(struct gk20a_debug_output *o,
|
||||
const char *fmt, ...)
|
||||
void gk20a_debug_output(struct gk20a_debug_output *o, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
int len;
|
||||
@@ -61,6 +62,13 @@ void gk20a_debug_output(struct gk20a_debug_output *o,
|
||||
o->fn(o->ctx, o->buf, len);
|
||||
}
|
||||
|
||||
void gk20a_debug_show_dump(struct gk20a *g, struct gk20a_debug_output *o)
|
||||
{
|
||||
gk20a_debug_dump_all_channel_status_ramfc(g, o);
|
||||
g->ops.fifo.dump_pbdma_status(g, o);
|
||||
g->ops.fifo.dump_eng_status(g, o);
|
||||
}
|
||||
|
||||
static int gk20a_gr_dump_regs(struct gk20a *g,
|
||||
struct gk20a_debug_output *o)
|
||||
{
|
||||
@@ -73,7 +81,8 @@ static int gk20a_gr_dump_regs(struct gk20a *g,
|
||||
int gk20a_gr_debug_dump(struct gk20a *g)
|
||||
{
|
||||
struct gk20a_debug_output o = {
|
||||
.fn = gk20a_debug_write_printk
|
||||
.fn = gk20a_debug_write_printk,
|
||||
.ctx = g,
|
||||
};
|
||||
|
||||
gk20a_gr_dump_regs(g, &o);
|
||||
@@ -108,7 +117,8 @@ void gk20a_debug_dump(struct gk20a *g)
|
||||
{
|
||||
struct gk20a_platform *platform = gk20a_get_platform(dev_from_gk20a(g));
|
||||
struct gk20a_debug_output o = {
|
||||
.fn = gk20a_debug_write_printk
|
||||
.fn = gk20a_debug_write_printk,
|
||||
.ctx = g,
|
||||
};
|
||||
|
||||
/* HAL only initialized after 1st power-on */
|
||||
@@ -169,13 +179,6 @@ static const struct file_operations gk20a_debug_fops = {
|
||||
.release = single_release,
|
||||
};
|
||||
|
||||
void gk20a_debug_show_dump(struct gk20a *g, struct gk20a_debug_output *o)
|
||||
{
|
||||
gk20a_debug_dump_all_channel_status_ramfc(g, o);
|
||||
g->ops.fifo.dump_pbdma_status(g, o);
|
||||
g->ops.fifo.dump_eng_status(g, o);
|
||||
}
|
||||
|
||||
static ssize_t disable_bigpage_read(struct file *file, char __user *user_buf, size_t count, loff_t *ppos)
|
||||
{
|
||||
char buf[3];
|
||||
|
||||
Reference in New Issue
Block a user