diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2014-06-11 07:53:38 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:10:13 -0400 |
commit | c32ac10b0bba400c1e83540a20c5ca210fa48613 (patch) | |
tree | c2f82ebde6d6f79d670fe374620833075ab02093 /drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |
parent | aa3e3aaaa098e004045bcc8dd874431a3c0f2b2d (diff) |
gpu: nvgpu: Dump offending push buffer fragment
When outputting debug dump, print the contents of current push buffer
segment.
Also changes the debug dump to use pr_cont when applicable, and dumps
state before recovering in case channel was not loaded to an engine.
Bug 1498688
Change-Id: I5ca12f64bae8f12333d82350278c700645d5007e
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/422198
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 0f805214..486e815c 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -929,6 +929,21 @@ static void channel_gk20a_free_priv_cmdbuf(struct channel_gk20a *c) | |||
929 | memset(q, 0, sizeof(struct priv_cmd_queue)); | 929 | memset(q, 0, sizeof(struct priv_cmd_queue)); |
930 | } | 930 | } |
931 | 931 | ||
932 | int gk20a_find_from_priv_cmdbuf(struct channel_gk20a *c, | ||
933 | u64 gpu_va, u32 **cpu_va) | ||
934 | { | ||
935 | struct priv_cmd_queue *q = &c->priv_cmd_q; | ||
936 | int ret; | ||
937 | |||
938 | if (gpu_va >= q->base_gpuva && gpu_va < (q->base_gpuva + q->size)) { | ||
939 | *cpu_va = gpu_va - q->base_gpuva + q->mem.base_cpuva; | ||
940 | ret = 0; | ||
941 | } else | ||
942 | ret = -EINVAL; | ||
943 | |||
944 | return ret; | ||
945 | } | ||
946 | |||
932 | /* allocate a cmd buffer with given size. size is number of u32 entries */ | 947 | /* allocate a cmd buffer with given size. size is number of u32 entries */ |
933 | int gk20a_channel_alloc_priv_cmdbuf(struct channel_gk20a *c, u32 orig_size, | 948 | int gk20a_channel_alloc_priv_cmdbuf(struct channel_gk20a *c, u32 orig_size, |
934 | struct priv_cmd_entry **entry) | 949 | struct priv_cmd_entry **entry) |