diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/vgpu/ce2_vgpu.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/vgpu/ce2_vgpu.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/ce2_vgpu.c b/drivers/gpu/nvgpu/common/linux/vgpu/ce2_vgpu.c new file mode 100644 index 00000000..ffb85f16 --- /dev/null +++ b/drivers/gpu/nvgpu/common/linux/vgpu/ce2_vgpu.c | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * Virtualized GPU CE2 | ||
3 | * | ||
4 | * Copyright (c) 2015-2017, 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 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | */ | ||
18 | |||
19 | #include "vgpu.h" | ||
20 | |||
21 | #include <nvgpu/bug.h> | ||
22 | |||
23 | int vgpu_ce2_nonstall_isr(struct gk20a *g, | ||
24 | struct tegra_vgpu_ce2_nonstall_intr_info *info) | ||
25 | { | ||
26 | gk20a_dbg_fn(""); | ||
27 | |||
28 | switch (info->type) { | ||
29 | case TEGRA_VGPU_CE2_NONSTALL_INTR_NONBLOCKPIPE: | ||
30 | gk20a_channel_semaphore_wakeup(g, true); | ||
31 | break; | ||
32 | default: | ||
33 | WARN_ON(1); | ||
34 | break; | ||
35 | } | ||
36 | |||
37 | return 0; | ||
38 | } | ||
39 | |||
40 | u32 vgpu_ce_get_num_pce(struct gk20a *g) | ||
41 | { | ||
42 | struct vgpu_priv_data *priv = vgpu_get_priv_data(g); | ||
43 | |||
44 | return priv->constants.num_pce; | ||
45 | } | ||