summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2018-06-25 05:35:42 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-06-27 21:40:16 -0400
commit7998233b77a343d002b699d5f348bbeb243e16f5 (patch)
treeaa24afcc414be8fbccf6991804f69946e2b72525 /drivers/gpu/nvgpu/include
parent2ac6fb4253fa815ed17f09a01141b938c826dac9 (diff)
gpu: nvgpu: move submit code to common
To finish OS unification of the submit path, move the gk20a_submit_channel_gpfifo* functions to a file that's accessible also outside Linux code. Also change the prefix of the submit functions from gk20a_ to nvgpu_. Jira NVGPU-705 Change-Id: I8ca355d1eb69771fb016c7a21fc7f102ca7967d7 Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1760421 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/channel.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/channel.h b/drivers/gpu/nvgpu/include/nvgpu/channel.h
new file mode 100644
index 00000000..604083d4
--- /dev/null
+++ b/drivers/gpu/nvgpu/include/nvgpu/channel.h
@@ -0,0 +1,52 @@
1/*
2 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 */
22
23#include <nvgpu/types.h>
24
25#include "gk20a/gk20a.h"
26
27struct nvgpu_channel_fence;
28struct gk20a_fence;
29struct fifo_profile_gk20a;
30
31int nvgpu_submit_channel_gpfifo_user(struct channel_gk20a *c,
32 struct nvgpu_gpfifo_userdata userdata,
33 u32 num_entries,
34 u32 flags,
35 struct nvgpu_channel_fence *fence,
36 struct gk20a_fence **fence_out,
37 struct fifo_profile_gk20a *profile);
38
39int nvgpu_submit_channel_gpfifo_kernel(struct channel_gk20a *c,
40 struct nvgpu_gpfifo_entry *gpfifo,
41 u32 num_entries,
42 u32 flags,
43 struct nvgpu_channel_fence *fence,
44 struct gk20a_fence **fence_out);
45
46#ifdef CONFIG_DEBUG_FS
47void trace_write_pushbuffers(struct channel_gk20a *c, int count);
48#else
49static inline void trace_write_pushbuffers(struct channel_gk20a *c, int count)
50{
51}
52#endif