diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2016-12-27 05:01:00 -0500 |
---|---|---|
committer | Deepak Nibade <dnibade@nvidia.com> | 2016-12-27 05:35:06 -0500 |
commit | 7a81883a0d70c3a43ad2841ac235f6dc344c60fb (patch) | |
tree | 92923d2efccf90d1961071fa9acde59178a0d688 /drivers/gpu/nvgpu/gp10b/fecs_trace_gp10b.c | |
parent | 505b442551a2e27aa3bc9e608c5a2bc9fccecbc4 (diff) | |
parent | 2aa3c85f8e82b3c07c39e677663abd3687c1822a (diff) |
Merge remote-tracking branch 'remotes/origin/dev/merge-nvgpu-t18x-into-nvgpu' into dev-kernel
Merge T186 - gp10b/gp106 code into common nvgpu repo
Bug 200266498
Change-Id: Ibf100ee38010cbed85c149b69b99147256f9a005
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/fecs_trace_gp10b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/fecs_trace_gp10b.c | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/fecs_trace_gp10b.c b/drivers/gpu/nvgpu/gp10b/fecs_trace_gp10b.c new file mode 100644 index 00000000..7dd200a9 --- /dev/null +++ b/drivers/gpu/nvgpu/gp10b/fecs_trace_gp10b.c | |||
@@ -0,0 +1,53 @@ | |||
1 | /* | ||
2 | * GP10B GPU FECS traces | ||
3 | * | ||
4 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms and conditions of the GNU General Public License, | ||
8 | * version 2, as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
13 | * more details. | ||
14 | */ | ||
15 | |||
16 | #include "gk20a/gk20a.h" | ||
17 | #include "gk20a/fecs_trace_gk20a.h" | ||
18 | #include "gp10b/hw_ctxsw_prog_gp10b.h" | ||
19 | #include "gp10b/hw_gr_gp10b.h" | ||
20 | |||
21 | #ifdef CONFIG_GK20A_CTXSW_TRACE | ||
22 | static int gp10b_fecs_trace_flush(struct gk20a *g) | ||
23 | { | ||
24 | struct fecs_method_op_gk20a op = { | ||
25 | .mailbox = { .id = 0, .data = 0, | ||
26 | .clr = ~0, .ok = 0, .fail = 0}, | ||
27 | .method.addr = gr_fecs_method_push_adr_write_timestamp_record_v(), | ||
28 | .method.data = 0, | ||
29 | .cond.ok = GR_IS_UCODE_OP_NOT_EQUAL, | ||
30 | .cond.fail = GR_IS_UCODE_OP_SKIP, | ||
31 | }; | ||
32 | int err; | ||
33 | |||
34 | gk20a_dbg(gpu_dbg_fn|gpu_dbg_ctxsw, ""); | ||
35 | |||
36 | err = gr_gk20a_elpg_protected_call(g, | ||
37 | gr_gk20a_submit_fecs_method_op(g, op, false)); | ||
38 | if (err) | ||
39 | gk20a_err(dev_from_gk20a(g), "write timestamp record failed"); | ||
40 | |||
41 | return err; | ||
42 | } | ||
43 | |||
44 | void gp10b_init_fecs_trace_ops(struct gpu_ops *ops) | ||
45 | { | ||
46 | gk20a_init_fecs_trace_ops(ops); | ||
47 | ops->fecs_trace.flush = gp10b_fecs_trace_flush; | ||
48 | } | ||
49 | #else | ||
50 | void gp10b_init_fecs_trace_ops(struct gpu_ops *ops) | ||
51 | { | ||
52 | } | ||
53 | #endif /* CONFIG_GK20A_CTXSW_TRACE */ | ||