summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include/nvgpu/sim.h
diff options
context:
space:
mode:
authorAntony Clince Alex <aalex@nvidia.com>2018-04-26 00:29:35 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-05-09 21:25:54 -0400
commit7e66f2a63d4855e763fa768047dfc32f6f96b771 (patch)
tree2c460b497653a361eeff58e6e2ddb5601eeb43b1 /drivers/gpu/nvgpu/include/nvgpu/sim.h
parent50d1b0c72bfa5bf662c04db85e39c04ca3abfd67 (diff)
gpu: nvgpu: created os-agnostic sim header.
added a os-agnostic sim.h header which could be included in by any platform, moved out os specific headers to nvgpu/linux. JIRA VQRM-2368 Change-Id: I3861bfa75a6b8d2d909bc7223467fd68c208275b Signed-off-by: Antony Clince Alex <aalex@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1702816 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include/nvgpu/sim.h')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/sim.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/sim.h b/drivers/gpu/nvgpu/include/nvgpu/sim.h
new file mode 100644
index 00000000..78b749dd
--- /dev/null
+++ b/drivers/gpu/nvgpu/include/nvgpu/sim.h
@@ -0,0 +1,54 @@
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#ifndef __NVGPU_SIM_H__
23#define __NVGPU_SIM_H__
24
25#include <nvgpu/nvgpu_mem.h>
26
27struct gk20a;
28struct sim_nvgpu {
29 struct gk20a *g;
30 u32 send_ring_put;
31 u32 recv_ring_get;
32 u32 recv_ring_put;
33 u32 sequence_base;
34 struct nvgpu_mem send_bfr;
35 struct nvgpu_mem recv_bfr;
36 struct nvgpu_mem msg_bfr;
37 void (*remove_support)(struct gk20a *);
38 int (*esc_readl)(
39 struct gk20a *g, char *path, u32 index, u32 *data);
40};
41#ifdef __KERNEL__
42#include "linux/sim.h"
43#include "linux/sim_pci.h"
44#else
45
46#endif
47int nvgpu_init_sim_support(struct gk20a *g);
48int nvgpu_init_sim_support_pci(struct gk20a *g);
49int nvgpu_alloc_sim_buffer(struct gk20a *g, struct nvgpu_mem *mem);
50void nvgpu_free_sim_buffer(struct gk20a *g, struct nvgpu_mem *mem);
51void nvgpu_free_sim_support(struct gk20a *g);
52void nvgpu_remove_sim_support(struct gk20a *g);
53
54#endif