From ac5763eb0cdafb79be9e95b5917ad4fc510ffbb2 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Wed, 31 Oct 2018 10:57:37 -0700 Subject: [PATCH] gpu: nvgpu: Re-order the debug output Originally the order for output was: 1. Dump platform deps (sync-points/host1x stuff) 2. Dump PBDMA status 3. Dump engine status 4. Dump channel status The updated ordering is: 1. Dump channel status 2. Dump PBDMA status 3. Dump engine status 4. Dump platform deps (sync-points/host1x stuff) The purpose of this is to put the useful information first and relegate the less useful info to later in the dump. We naturally scan downwards and treat stuff at the top as most important. The end goal is to make the debug dump as useful in as little time as possible. So instead of making an engineer dig through a complex jumble of information to find the useful stuff the hope is that the useful stuff is immediately available. Change-Id: I9d2b755676b7e5dc2f8949f14dc36f3d337e2a3f Signed-off-by: Alex Waterman Reviewed-on: https://git-master.nvidia.com/r/1940514 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/debug.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/nvgpu/os/linux/debug.c b/drivers/gpu/nvgpu/os/linux/debug.c index 5f0703c87..1d481c138 100644 --- a/drivers/gpu/nvgpu/os/linux/debug.c +++ b/drivers/gpu/nvgpu/os/linux/debug.c @@ -111,12 +111,12 @@ void gk20a_debug_dump(struct gk20a *g) .fn = gk20a_debug_write_printk }; - if (platform->dump_platform_dependencies) - platform->dump_platform_dependencies(dev_from_gk20a(g)); - /* HAL only initialized after 1st power-on */ if (g->ops.debug.show_dump) g->ops.debug.show_dump(g, &o); + + if (platform->dump_platform_dependencies) + platform->dump_platform_dependencies(dev_from_gk20a(g)); } static int gk20a_debug_show(struct seq_file *s, void *unused) @@ -171,10 +171,9 @@ static const struct file_operations gk20a_debug_fops = { 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); - - gk20a_debug_dump_all_channel_status_ramfc(g, o); } static ssize_t disable_bigpage_read(struct file *file, char __user *user_buf, size_t count, loff_t *ppos)