diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-05-24 08:07:04 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-06-02 09:53:35 -0400 |
commit | 6090a8a7ee347f92d806f104d3a0082208f5df64 (patch) | |
tree | 74b0d7057ea1b112d7de41f1bbce5e212f1525de /drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |
parent | be7f22db8bc5bff131432a4f6d127ecc8ce5096d (diff) |
gpu: nvgpu: move debugfs code to linux module
Since all debugfs code is Linux specific, remove
it from common code and move it to Linux module
Debugfs code is now divided into below
module specific files :
common/linux/debug.c
common/linux/debug_cde.c
common/linux/debug_ce.c
common/linux/debug_fifo.c
common/linux/debug_gr.c
common/linux/debug_mm.c
common/linux/debug_allocator.c
common/linux/debug_kmem.c
common/linux/debug_pmu.c
common/linux/debug_sched.c
Add corresponding header files for above modules too
And compile all of above files only if CONFIG_DEBUG_FS is set
Some more details of the changes made
- Move and rename gk20a/debug_gk20a.c to common/linux/debug.c
- Move and rename gk20a/debug_gk20a.h to include/nvgpu/debug.h
- Remove gm20b/debug_gm20b.c and gm20b/debug_gm20b.h and call
gk20a_init_debug_ops() directly from gm20b_init_hal()
- Update all debug APIs to receive struct gk20a as parameter
instead of receiving struct device pointer
- Update API gk20a_dmabuf_get_state() to receive struct gk20a
pointer instead of struct device
- Include <nvgpu/debug.h> explicitly in all files where debug
operations are used
- Remove "gk20a/platform_gk20a.h" include from HAL files
which no longer need this include
- Add new API gk20a_debug_deinit() to deinitialize debugfs
and call it from gk20a_remove()
- Move API gk20a_debug_dump_all_channel_status_ramfc() to
gk20a/fifo_gk20a.c
Jira NVGPU-62
Change-Id: I076975d3d7f669bdbe9212fa33d98529377feeb6
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1488902
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 2188618c..982cfac8 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <nvgpu/bug.h> | 30 | #include <nvgpu/bug.h> |
31 | #include <nvgpu/firmware.h> | 31 | #include <nvgpu/firmware.h> |
32 | #include <nvgpu/enabled.h> | 32 | #include <nvgpu/enabled.h> |
33 | #include <nvgpu/debug.h> | ||
33 | 34 | ||
34 | #include "gk20a.h" | 35 | #include "gk20a.h" |
35 | #include "kind_gk20a.h" | 36 | #include "kind_gk20a.h" |
@@ -37,13 +38,8 @@ | |||
37 | #include "gr_pri_gk20a.h" | 38 | #include "gr_pri_gk20a.h" |
38 | #include "regops_gk20a.h" | 39 | #include "regops_gk20a.h" |
39 | #include "dbg_gpu_gk20a.h" | 40 | #include "dbg_gpu_gk20a.h" |
40 | #include "debug_gk20a.h" | ||
41 | #include "ctxsw_trace_gk20a.h" | 41 | #include "ctxsw_trace_gk20a.h" |
42 | 42 | ||
43 | #ifdef CONFIG_DEBUG_FS | ||
44 | #include "platform_gk20a.h" | ||
45 | #endif | ||
46 | |||
47 | #include <nvgpu/hw/gk20a/hw_ccsr_gk20a.h> | 43 | #include <nvgpu/hw/gk20a/hw_ccsr_gk20a.h> |
48 | #include <nvgpu/hw/gk20a/hw_ctxsw_prog_gk20a.h> | 44 | #include <nvgpu/hw/gk20a/hw_ctxsw_prog_gk20a.h> |
49 | #include <nvgpu/hw/gk20a/hw_fifo_gk20a.h> | 45 | #include <nvgpu/hw/gk20a/hw_fifo_gk20a.h> |
@@ -514,7 +510,7 @@ int gr_gk20a_ctx_wait_ucode(struct gk20a *g, u32 mailbox_id, | |||
514 | nvgpu_err(g, | 510 | nvgpu_err(g, |
515 | "timeout waiting on ucode response"); | 511 | "timeout waiting on ucode response"); |
516 | gk20a_fecs_dump_falcon_stats(g); | 512 | gk20a_fecs_dump_falcon_stats(g); |
517 | gk20a_gr_debug_dump(g->dev); | 513 | gk20a_gr_debug_dump(g); |
518 | return -1; | 514 | return -1; |
519 | } else if (check == WAIT_UCODE_ERROR) { | 515 | } else if (check == WAIT_UCODE_ERROR) { |
520 | nvgpu_err(g, | 516 | nvgpu_err(g, |
@@ -9032,20 +9028,6 @@ static int gr_gk20a_dump_gr_status_regs(struct gk20a *g, | |||
9032 | return 0; | 9028 | return 0; |
9033 | } | 9029 | } |
9034 | 9030 | ||
9035 | #ifdef CONFIG_DEBUG_FS | ||
9036 | int gr_gk20a_debugfs_init(struct gk20a *g) | ||
9037 | { | ||
9038 | struct gk20a_platform *platform = dev_get_drvdata(g->dev); | ||
9039 | |||
9040 | g->debugfs_gr_default_attrib_cb_size = | ||
9041 | debugfs_create_u32("gr_default_attrib_cb_size", | ||
9042 | S_IRUGO|S_IWUSR, platform->debugfs, | ||
9043 | &g->gr.attrib_cb_default_size); | ||
9044 | |||
9045 | return 0; | ||
9046 | } | ||
9047 | #endif | ||
9048 | |||
9049 | static void gr_gk20a_init_cyclestats(struct gk20a *g) | 9031 | static void gr_gk20a_init_cyclestats(struct gk20a *g) |
9050 | { | 9032 | { |
9051 | #if defined(CONFIG_GK20A_CYCLE_STATS) | 9033 | #if defined(CONFIG_GK20A_CYCLE_STATS) |