diff options
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/gp10b/vgpu_fifo_gp10b.c')
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gp10b/vgpu_fifo_gp10b.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_fifo_gp10b.c b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_fifo_gp10b.c new file mode 100644 index 00000000..23d945fb --- /dev/null +++ b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_fifo_gp10b.c | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2015-2016, 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 | |||
14 | #include "vgpu_fifo_gp10b.h" | ||
15 | |||
16 | static int vgpu_gp10b_fifo_init_engine_info(struct fifo_gk20a *f) | ||
17 | { | ||
18 | struct fifo_engine_info_gk20a *gr_info; | ||
19 | struct fifo_engine_info_gk20a *ce_info; | ||
20 | const u32 gr_sw_id = ENGINE_GR_GK20A; | ||
21 | const u32 ce_sw_id = ENGINE_GRCE_GK20A; | ||
22 | |||
23 | gk20a_dbg_fn(""); | ||
24 | |||
25 | f->num_engines = 2; | ||
26 | |||
27 | gr_info = &f->engine_info[0]; | ||
28 | |||
29 | /* FIXME: retrieve this from server */ | ||
30 | gr_info->runlist_id = 0; | ||
31 | gr_info->engine_enum = gr_sw_id; | ||
32 | f->active_engines_list[0] = 0; | ||
33 | |||
34 | ce_info = &f->engine_info[1]; | ||
35 | ce_info->runlist_id = 0; | ||
36 | ce_info->inst_id = 0; | ||
37 | ce_info->engine_enum = ce_sw_id; | ||
38 | f->active_engines_list[1] = 1; | ||
39 | |||
40 | return 0; | ||
41 | } | ||
42 | |||
43 | void vgpu_gp10b_init_fifo_ops(struct gpu_ops *gops) | ||
44 | { | ||
45 | /* syncpoint protection not supported yet */ | ||
46 | gops->fifo.init_engine_info = vgpu_gp10b_fifo_init_engine_info; | ||
47 | gops->fifo.resetup_ramfc = NULL; | ||
48 | } | ||