diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 571570d8..13abed95 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -30,9 +30,9 @@ | |||
30 | #include <nvgpu/circ_buf.h> | 30 | #include <nvgpu/circ_buf.h> |
31 | #include <nvgpu/cond.h> | 31 | #include <nvgpu/cond.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 "debug_gk20a.h" | ||
36 | #include "ctxsw_trace_gk20a.h" | 36 | #include "ctxsw_trace_gk20a.h" |
37 | #include "dbg_gpu_gk20a.h" | 37 | #include "dbg_gpu_gk20a.h" |
38 | #include "fence_gk20a.h" | 38 | #include "fence_gk20a.h" |
@@ -1403,6 +1403,7 @@ static u32 get_gp_free_count(struct channel_gk20a *c) | |||
1403 | return gp_free_count(c); | 1403 | return gp_free_count(c); |
1404 | } | 1404 | } |
1405 | 1405 | ||
1406 | #ifdef CONFIG_DEBUG_FS | ||
1406 | static void trace_write_pushbuffer(struct channel_gk20a *c, | 1407 | static void trace_write_pushbuffer(struct channel_gk20a *c, |
1407 | struct nvgpu_gpfifo *g) | 1408 | struct nvgpu_gpfifo *g) |
1408 | { | 1409 | { |
@@ -1439,6 +1440,7 @@ static void trace_write_pushbuffer(struct channel_gk20a *c, | |||
1439 | dma_buf_vunmap(dmabuf, mem); | 1440 | dma_buf_vunmap(dmabuf, mem); |
1440 | } | 1441 | } |
1441 | } | 1442 | } |
1443 | #endif | ||
1442 | 1444 | ||
1443 | static void trace_write_pushbuffer_range(struct channel_gk20a *c, | 1445 | static void trace_write_pushbuffer_range(struct channel_gk20a *c, |
1444 | struct nvgpu_gpfifo *g, | 1446 | struct nvgpu_gpfifo *g, |
@@ -1446,6 +1448,7 @@ static void trace_write_pushbuffer_range(struct channel_gk20a *c, | |||
1446 | int offset, | 1448 | int offset, |
1447 | int count) | 1449 | int count) |
1448 | { | 1450 | { |
1451 | #ifdef CONFIG_DEBUG_FS | ||
1449 | u32 size; | 1452 | u32 size; |
1450 | int i; | 1453 | int i; |
1451 | struct nvgpu_gpfifo *gp; | 1454 | struct nvgpu_gpfifo *gp; |
@@ -1478,6 +1481,7 @@ static void trace_write_pushbuffer_range(struct channel_gk20a *c, | |||
1478 | 1481 | ||
1479 | if (gpfifo_allocated) | 1482 | if (gpfifo_allocated) |
1480 | nvgpu_big_free(c->g, g); | 1483 | nvgpu_big_free(c->g, g); |
1484 | #endif | ||
1481 | } | 1485 | } |
1482 | 1486 | ||
1483 | static void __gk20a_channel_timeout_start(struct channel_gk20a *ch) | 1487 | static void __gk20a_channel_timeout_start(struct channel_gk20a *ch) |
@@ -1629,8 +1633,8 @@ static void gk20a_channel_timeout_handler(struct channel_gk20a *ch) | |||
1629 | nvgpu_err(g, "Job on channel %d timed out", | 1633 | nvgpu_err(g, "Job on channel %d timed out", |
1630 | ch->hw_chid); | 1634 | ch->hw_chid); |
1631 | 1635 | ||
1632 | gk20a_debug_dump(g->dev); | 1636 | gk20a_debug_dump(g); |
1633 | gk20a_gr_debug_dump(g->dev); | 1637 | gk20a_gr_debug_dump(g); |
1634 | 1638 | ||
1635 | g->ops.fifo.force_reset_ch(ch, | 1639 | g->ops.fifo.force_reset_ch(ch, |
1636 | NVGPU_CHANNEL_FIFO_ERROR_IDLE_TIMEOUT, true); | 1640 | NVGPU_CHANNEL_FIFO_ERROR_IDLE_TIMEOUT, true); |