diff options
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gp10b/vgpu_gr_gp10b.c | 3 | ||||
-rw-r--r-- | include/linux/tegra_vgpu.h | 25 | ||||
-rw-r--r-- | include/linux/tegra_vgpu_t18x.h | 42 |
3 files changed, 18 insertions, 52 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_gr_gp10b.c b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_gr_gp10b.c index da41abd4..1a5811fe 100644 --- a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_gr_gp10b.c +++ b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_gr_gp10b.c | |||
@@ -117,9 +117,6 @@ static int vgpu_gr_gp10b_set_ctxsw_preemption_mode(struct gk20a *g, | |||
117 | &msg.params.gr_bind_ctxsw_buffers; | 117 | &msg.params.gr_bind_ctxsw_buffers; |
118 | int err = 0; | 118 | int err = 0; |
119 | 119 | ||
120 | WARN_ON(TEGRA_VGPU_GR_BIND_CTXSW_BUFFER_MAX != | ||
121 | TEGRA_VGPU_GR_BIND_CTXSW_BUFFER_LAST); | ||
122 | |||
123 | if (class == PASCAL_A && g->gr.t18x.ctx_vars.force_preemption_gfxp) | 120 | if (class == PASCAL_A && g->gr.t18x.ctx_vars.force_preemption_gfxp) |
124 | graphics_preempt_mode = NVGPU_GRAPHICS_PREEMPTION_MODE_GFXP; | 121 | graphics_preempt_mode = NVGPU_GRAPHICS_PREEMPTION_MODE_GFXP; |
125 | 122 | ||
diff --git a/include/linux/tegra_vgpu.h b/include/linux/tegra_vgpu.h index bb9bdcab..d9a6f7fd 100644 --- a/include/linux/tegra_vgpu.h +++ b/include/linux/tegra_vgpu.h | |||
@@ -19,10 +19,6 @@ | |||
19 | #ifndef __TEGRA_VGPU_H | 19 | #ifndef __TEGRA_VGPU_H |
20 | #define __TEGRA_VGPU_H | 20 | #define __TEGRA_VGPU_H |
21 | 21 | ||
22 | #ifdef CONFIG_ARCH_TEGRA_18x_SOC | ||
23 | #include <linux/tegra_vgpu_t18x.h> | ||
24 | #endif | ||
25 | |||
26 | enum { | 22 | enum { |
27 | TEGRA_VGPU_MODULE_GPU = 0, | 23 | TEGRA_VGPU_MODULE_GPU = 0, |
28 | }; | 24 | }; |
@@ -139,6 +135,7 @@ enum { | |||
139 | TEGRA_VGPU_ATTRIB_TPC_COUNT = 19, /* deprecated */ | 135 | TEGRA_VGPU_ATTRIB_TPC_COUNT = 19, /* deprecated */ |
140 | TEGRA_VGPU_ATTRIB_GPC0_TPC_COUNT = 20, /* deprecated */ | 136 | TEGRA_VGPU_ATTRIB_GPC0_TPC_COUNT = 20, /* deprecated */ |
141 | TEGRA_VGPU_ATTRIB_MAX_FREQ = 21, /* deprecated */ | 137 | TEGRA_VGPU_ATTRIB_MAX_FREQ = 21, /* deprecated */ |
138 | TEGRA_VGPU_ATTRIB_PREEMPT_CTX_SIZE = 64, /* gap to hide T18x IP */ | ||
142 | }; | 139 | }; |
143 | 140 | ||
144 | struct tegra_vgpu_attrib_params { | 141 | struct tegra_vgpu_attrib_params { |
@@ -281,12 +278,26 @@ struct tegra_vgpu_zbc_query_table_params { | |||
281 | u32 index_size; /* [out] size, [in] index */ | 278 | u32 index_size; /* [out] size, [in] index */ |
282 | }; | 279 | }; |
283 | 280 | ||
284 | #define TEGRA_VGPU_GR_BIND_CTXSW_BUFFER_MAX 4 | 281 | enum { |
282 | TEGRA_VGPU_GR_BIND_CTXSW_BUFFER_MAIN, | ||
283 | TEGRA_VGPU_GR_BIND_CTXSW_BUFFER_SPILL, | ||
284 | TEGRA_VGPU_GR_BIND_CTXSW_BUFFER_PAGEPOOL, | ||
285 | TEGRA_VGPU_GR_BIND_CTXSW_BUFFER_BETACB, | ||
286 | TEGRA_VGPU_GR_BIND_CTXSW_BUFFER_LAST | ||
287 | }; | ||
288 | |||
289 | enum { | ||
290 | TEGRA_VGPU_GR_CTXSW_PREEMPTION_MODE_WFI, | ||
291 | TEGRA_VGPU_GR_CTXSW_PREEMPTION_MODE_GFX_GFXP, | ||
292 | TEGRA_VGPU_GR_CTXSW_PREEMPTION_MODE_COMPUTE_CTA, | ||
293 | TEGRA_VGPU_GR_CTXSW_PREEMPTION_MODE_COMPUTE_CILP, | ||
294 | TEGRA_VGPU_GR_CTXSW_PREEMPTION_MODE_LAST | ||
295 | }; | ||
285 | 296 | ||
286 | struct tegra_vgpu_gr_bind_ctxsw_buffers_params { | 297 | struct tegra_vgpu_gr_bind_ctxsw_buffers_params { |
287 | u64 handle; /* deprecated */ | 298 | u64 handle; /* deprecated */ |
288 | u64 gpu_va[TEGRA_VGPU_GR_BIND_CTXSW_BUFFER_MAX]; | 299 | u64 gpu_va[TEGRA_VGPU_GR_BIND_CTXSW_BUFFER_LAST]; |
289 | u64 size[TEGRA_VGPU_GR_BIND_CTXSW_BUFFER_MAX]; | 300 | u64 size[TEGRA_VGPU_GR_BIND_CTXSW_BUFFER_LAST]; |
290 | u32 mode; | 301 | u32 mode; |
291 | u64 gr_ctx_handle; | 302 | u64 gr_ctx_handle; |
292 | }; | 303 | }; |
diff --git a/include/linux/tegra_vgpu_t18x.h b/include/linux/tegra_vgpu_t18x.h deleted file mode 100644 index 121f4103..00000000 --- a/include/linux/tegra_vgpu_t18x.h +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | /* | ||
2 | * Tegra GPU Virtualization Interfaces to Server | ||
3 | * | ||
4 | * Copyright (c) 2015, 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 | #ifndef __TEGRA_VGPU_T18X_H | ||
20 | #define __TEGRA_VGPU_T18X_H | ||
21 | |||
22 | enum { | ||
23 | TEGRA_VGPU_GR_BIND_CTXSW_BUFFER_MAIN, | ||
24 | TEGRA_VGPU_GR_BIND_CTXSW_BUFFER_SPILL, | ||
25 | TEGRA_VGPU_GR_BIND_CTXSW_BUFFER_PAGEPOOL, | ||
26 | TEGRA_VGPU_GR_BIND_CTXSW_BUFFER_BETACB, | ||
27 | TEGRA_VGPU_GR_BIND_CTXSW_BUFFER_LAST | ||
28 | }; | ||
29 | |||
30 | enum { | ||
31 | TEGRA_VGPU_GR_CTXSW_PREEMPTION_MODE_WFI, | ||
32 | TEGRA_VGPU_GR_CTXSW_PREEMPTION_MODE_GFX_GFXP, | ||
33 | TEGRA_VGPU_GR_CTXSW_PREEMPTION_MODE_COMPUTE_CTA, | ||
34 | TEGRA_VGPU_GR_CTXSW_PREEMPTION_MODE_COMPUTE_CILP, | ||
35 | TEGRA_VGPU_GR_CTXSW_PREEMPTION_MODE_LAST | ||
36 | }; | ||
37 | |||
38 | enum { | ||
39 | TEGRA_VGPU_ATTRIB_PREEMPT_CTX_SIZE = 64 | ||
40 | }; | ||
41 | |||
42 | #endif | ||