summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h')
-rw-r--r--drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h104
1 files changed, 0 insertions, 104 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h
deleted file mode 100644
index 8fa1a0f8..00000000
--- a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h
+++ /dev/null
@@ -1,104 +0,0 @@
1/*
2 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef __VGPU_COMMON_H__
18#define __VGPU_COMMON_H__
19
20#include <nvgpu/types.h>
21#include <nvgpu/thread.h>
22#include <nvgpu/log.h>
23#include <nvgpu/vgpu/tegra_vgpu.h>
24
25struct device;
26struct tegra_vgpu_gr_intr_info;
27struct tegra_vgpu_fifo_intr_info;
28struct tegra_vgpu_cmd_msg;
29struct nvgpu_mem;
30struct gk20a;
31struct vm_gk20a;
32struct nvgpu_gr_ctx;
33struct nvgpu_cpu_time_correlation_sample;
34
35struct vgpu_priv_data {
36 u64 virt_handle;
37 struct nvgpu_thread intr_handler;
38 struct tegra_vgpu_constants_params constants;
39};
40
41struct vgpu_priv_data *vgpu_get_priv_data(struct gk20a *g);
42
43static inline u64 vgpu_get_handle(struct gk20a *g)
44{
45 struct vgpu_priv_data *priv = vgpu_get_priv_data(g);
46
47 if (unlikely(!priv)) {
48 nvgpu_err(g, "invalid vgpu_priv_data in %s", __func__);
49 return INT_MAX;
50 }
51
52 return priv->virt_handle;
53}
54
55int vgpu_comm_init(struct gk20a *g);
56void vgpu_comm_deinit(void);
57int vgpu_comm_sendrecv(struct tegra_vgpu_cmd_msg *msg, size_t size_in,
58 size_t size_out);
59u64 vgpu_connect(void);
60int vgpu_get_attribute(u64 handle, u32 attrib, u32 *value);
61int vgpu_intr_thread(void *dev_id);
62void vgpu_remove_support_common(struct gk20a *g);
63void vgpu_detect_chip(struct gk20a *g);
64int vgpu_init_gpu_characteristics(struct gk20a *g);
65int vgpu_read_ptimer(struct gk20a *g, u64 *value);
66int vgpu_get_timestamps_zipper(struct gk20a *g,
67 u32 source_id, u32 count,
68 struct nvgpu_cpu_time_correlation_sample *samples);
69int vgpu_init_hal(struct gk20a *g);
70int vgpu_get_constants(struct gk20a *g);
71u64 vgpu_bar1_map(struct gk20a *g, struct nvgpu_mem *mem);
72int vgpu_gr_isr(struct gk20a *g, struct tegra_vgpu_gr_intr_info *info);
73int vgpu_gr_nonstall_isr(struct gk20a *g,
74 struct tegra_vgpu_gr_nonstall_intr_info *info);
75int vgpu_gr_alloc_gr_ctx(struct gk20a *g,
76 struct nvgpu_gr_ctx *gr_ctx,
77 struct vm_gk20a *vm,
78 u32 class,
79 u32 flags);
80void vgpu_gr_free_gr_ctx(struct gk20a *g, struct vm_gk20a *vm,
81 struct nvgpu_gr_ctx *gr_ctx);
82void vgpu_gr_handle_sm_esr_event(struct gk20a *g,
83 struct tegra_vgpu_sm_esr_info *info);
84int vgpu_gr_init_ctx_state(struct gk20a *g);
85int vgpu_fifo_isr(struct gk20a *g, struct tegra_vgpu_fifo_intr_info *info);
86int vgpu_fifo_nonstall_isr(struct gk20a *g,
87 struct tegra_vgpu_fifo_nonstall_intr_info *info);
88int vgpu_ce2_nonstall_isr(struct gk20a *g,
89 struct tegra_vgpu_ce2_nonstall_intr_info *info);
90u32 vgpu_ce_get_num_pce(struct gk20a *g);
91int vgpu_init_mm_support(struct gk20a *g);
92int vgpu_init_gr_support(struct gk20a *g);
93int vgpu_init_fifo_support(struct gk20a *g);
94
95int vgpu_gp10b_init_hal(struct gk20a *g);
96int vgpu_gv11b_init_hal(struct gk20a *g);
97
98int vgpu_read_ptimer(struct gk20a *g, u64 *value);
99int vgpu_get_timestamps_zipper(struct gk20a *g,
100 u32 source_id, u32 count,
101 struct nvgpu_cpu_time_correlation_sample *samples);
102bool vgpu_is_reduced_bar1(struct gk20a *g);
103
104#endif