diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
9 files changed, 11 insertions, 50 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/module.c b/drivers/gpu/nvgpu/common/linux/module.c index cc2b5ec7..b95bac0b 100644 --- a/drivers/gpu/nvgpu/common/linux/module.c +++ b/drivers/gpu/nvgpu/common/linux/module.c | |||
@@ -52,9 +52,6 @@ | |||
52 | #include "sim.h" | 52 | #include "sim.h" |
53 | #ifdef CONFIG_TEGRA_19x_GPU | 53 | #ifdef CONFIG_TEGRA_19x_GPU |
54 | #include "nvgpu_gpuid_t19x.h" | 54 | #include "nvgpu_gpuid_t19x.h" |
55 | #ifdef CONFIG_TEGRA_GR_VIRTUALIZATION | ||
56 | #include "vgpu/vgpu_t19x.h" | ||
57 | #endif | ||
58 | #endif | 55 | #endif |
59 | 56 | ||
60 | #include "os_linux.h" | 57 | #include "os_linux.h" |
@@ -389,8 +386,8 @@ static struct of_device_id tegra_gk20a_of_match[] = { | |||
389 | { .compatible = TEGRA_19x_GPU_COMPAT_TEGRA, | 386 | { .compatible = TEGRA_19x_GPU_COMPAT_TEGRA, |
390 | .data = &t19x_gpu_tegra_platform }, | 387 | .data = &t19x_gpu_tegra_platform }, |
391 | #ifdef CONFIG_TEGRA_GR_VIRTUALIZATION | 388 | #ifdef CONFIG_TEGRA_GR_VIRTUALIZATION |
392 | { .compatible = TEGRA_19x_VGPU_COMPAT_TEGRA, | 389 | { .compatible = "nvidia,gv11b-vgpu", |
393 | .data = &t19x_vgpu_tegra_platform }, | 390 | .data = &gv11b_vgpu_tegra_platform}, |
394 | #endif | 391 | #endif |
395 | #endif | 392 | #endif |
396 | #ifdef CONFIG_TEGRA_GR_VIRTUALIZATION | 393 | #ifdef CONFIG_TEGRA_GR_VIRTUALIZATION |
diff --git a/drivers/gpu/nvgpu/common/linux/platform_gk20a.h b/drivers/gpu/nvgpu/common/linux/platform_gk20a.h index b8201954..37c80a70 100644 --- a/drivers/gpu/nvgpu/common/linux/platform_gk20a.h +++ b/drivers/gpu/nvgpu/common/linux/platform_gk20a.h | |||
@@ -252,6 +252,7 @@ extern struct gk20a_platform gm20b_tegra_platform; | |||
252 | extern struct gk20a_platform gp10b_tegra_platform; | 252 | extern struct gk20a_platform gp10b_tegra_platform; |
253 | #ifdef CONFIG_TEGRA_GR_VIRTUALIZATION | 253 | #ifdef CONFIG_TEGRA_GR_VIRTUALIZATION |
254 | extern struct gk20a_platform vgpu_tegra_platform; | 254 | extern struct gk20a_platform vgpu_tegra_platform; |
255 | extern struct gk20a_platform gv11b_vgpu_tegra_platform; | ||
255 | #endif | 256 | #endif |
256 | #endif | 257 | #endif |
257 | 258 | ||
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_fifo_gv11b.c b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_fifo_gv11b.c index 710e4b90..475036ee 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_fifo_gv11b.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_fifo_gv11b.c | |||
@@ -30,7 +30,7 @@ int vgpu_gv11b_fifo_alloc_syncpt_buf(struct channel_gk20a *c, | |||
30 | struct gk20a *g = c->g; | 30 | struct gk20a *g = c->g; |
31 | struct vm_gk20a *vm = c->vm; | 31 | struct vm_gk20a *vm = c->vm; |
32 | struct tegra_vgpu_cmd_msg msg = {}; | 32 | struct tegra_vgpu_cmd_msg msg = {}; |
33 | struct tegra_vgpu_map_syncpt_params *p = &msg.params.t19x.map_syncpt; | 33 | struct tegra_vgpu_map_syncpt_params *p = &msg.params.map_syncpt; |
34 | 34 | ||
35 | /* | 35 | /* |
36 | * Add ro map for complete sync point shim range in vm. | 36 | * Add ro map for complete sync point shim range in vm. |
@@ -97,15 +97,9 @@ int vgpu_gv11b_fifo_alloc_syncpt_buf(struct channel_gk20a *c, | |||
97 | int vgpu_gv11b_init_fifo_setup_hw(struct gk20a *g) | 97 | int vgpu_gv11b_init_fifo_setup_hw(struct gk20a *g) |
98 | { | 98 | { |
99 | struct fifo_gk20a *f = &g->fifo; | 99 | struct fifo_gk20a *f = &g->fifo; |
100 | int err; | 100 | struct vgpu_priv_data *priv = vgpu_get_priv_data(g); |
101 | 101 | ||
102 | err = vgpu_get_attribute(vgpu_get_handle(g), | 102 | f->t19x.max_subctx_count = priv->constants.max_subctx_count; |
103 | TEGRA_VGPU_ATTRIB_MAX_SUBCTX_COUNT, | ||
104 | &f->t19x.max_subctx_count); | ||
105 | if (err) { | ||
106 | nvgpu_err(g, "get max_subctx_count failed %d", err); | ||
107 | return err; | ||
108 | } | ||
109 | 103 | ||
110 | return 0; | 104 | return 0; |
111 | } | 105 | } |
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c index f6302d15..968eae10 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include "common/linux/vgpu/dbg_vgpu.h" | 25 | #include "common/linux/vgpu/dbg_vgpu.h" |
26 | #include "common/linux/vgpu/fecs_trace_vgpu.h" | 26 | #include "common/linux/vgpu/fecs_trace_vgpu.h" |
27 | #include "common/linux/vgpu/css_vgpu.h" | 27 | #include "common/linux/vgpu/css_vgpu.h" |
28 | #include "common/linux/vgpu/vgpu_t19x.h" | ||
29 | #include "common/linux/vgpu/gm20b/vgpu_gr_gm20b.h" | 28 | #include "common/linux/vgpu/gm20b/vgpu_gr_gm20b.h" |
30 | #include "common/linux/vgpu/gp10b/vgpu_mm_gp10b.h" | 29 | #include "common/linux/vgpu/gp10b/vgpu_mm_gp10b.h" |
31 | #include "common/linux/vgpu/gp10b/vgpu_gr_gp10b.h" | 30 | #include "common/linux/vgpu/gp10b/vgpu_gr_gp10b.h" |
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_subctx_gv11b.c b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_subctx_gv11b.c index 1e2de14d..d59f0381 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_subctx_gv11b.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_subctx_gv11b.c | |||
@@ -24,7 +24,7 @@ int vgpu_gv11b_alloc_subctx_header(struct channel_gk20a *c) | |||
24 | struct ctx_header_desc *ctx = &c->ch_ctx.ctx_header; | 24 | struct ctx_header_desc *ctx = &c->ch_ctx.ctx_header; |
25 | struct tegra_vgpu_cmd_msg msg = {}; | 25 | struct tegra_vgpu_cmd_msg msg = {}; |
26 | struct tegra_vgpu_alloc_ctx_header_params *p = | 26 | struct tegra_vgpu_alloc_ctx_header_params *p = |
27 | &msg.params.t19x.alloc_ctx_header; | 27 | &msg.params.alloc_ctx_header; |
28 | int err; | 28 | int err; |
29 | 29 | ||
30 | msg.cmd = TEGRA_VGPU_CMD_ALLOC_CTX_HEADER; | 30 | msg.cmd = TEGRA_VGPU_CMD_ALLOC_CTX_HEADER; |
@@ -55,7 +55,7 @@ void vgpu_gv11b_free_subctx_header(struct channel_gk20a *c) | |||
55 | struct ctx_header_desc *ctx = &c->ch_ctx.ctx_header; | 55 | struct ctx_header_desc *ctx = &c->ch_ctx.ctx_header; |
56 | struct tegra_vgpu_cmd_msg msg = {}; | 56 | struct tegra_vgpu_cmd_msg msg = {}; |
57 | struct tegra_vgpu_free_ctx_header_params *p = | 57 | struct tegra_vgpu_free_ctx_header_params *p = |
58 | &msg.params.t19x.free_ctx_header; | 58 | &msg.params.free_ctx_header; |
59 | int err; | 59 | int err; |
60 | 60 | ||
61 | if (ctx->mem.gpu_va) { | 61 | if (ctx->mem.gpu_va) { |
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_tsg_gv11b.c b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_tsg_gv11b.c index 094ccc44..c2e01218 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_tsg_gv11b.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_tsg_gv11b.c | |||
@@ -25,7 +25,7 @@ int vgpu_gv11b_tsg_bind_channel(struct tsg_gk20a *tsg, | |||
25 | { | 25 | { |
26 | struct tegra_vgpu_cmd_msg msg = {}; | 26 | struct tegra_vgpu_cmd_msg msg = {}; |
27 | struct tegra_vgpu_tsg_bind_channel_ex_params *p = | 27 | struct tegra_vgpu_tsg_bind_channel_ex_params *p = |
28 | &msg.params.t19x.tsg_bind_channel_ex; | 28 | &msg.params.tsg_bind_channel_ex; |
29 | int err; | 29 | int err; |
30 | 30 | ||
31 | gk20a_dbg_fn(""); | 31 | gk20a_dbg_fn(""); |
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c index bb523f1e..0d04d6e4 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.c | |||
@@ -48,7 +48,6 @@ | |||
48 | #include "common/linux/driver_common.h" | 48 | #include "common/linux/driver_common.h" |
49 | 49 | ||
50 | #ifdef CONFIG_TEGRA_19x_GPU | 50 | #ifdef CONFIG_TEGRA_19x_GPU |
51 | #include "common/linux/vgpu/vgpu_t19x.h" | ||
52 | #include <nvgpu_gpuid_t19x.h> | 51 | #include <nvgpu_gpuid_t19x.h> |
53 | #endif | 52 | #endif |
54 | 53 | ||
@@ -439,7 +438,7 @@ static int vgpu_init_hal(struct gk20a *g) | |||
439 | break; | 438 | break; |
440 | #ifdef CONFIG_TEGRA_19x_GPU | 439 | #ifdef CONFIG_TEGRA_19x_GPU |
441 | case TEGRA_19x_GPUID: | 440 | case TEGRA_19x_GPUID: |
442 | err = vgpu_t19x_init_hal(g); | 441 | err = vgpu_gv11b_init_hal(g); |
443 | break; | 442 | break; |
444 | #endif | 443 | #endif |
445 | default: | 444 | default: |
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h index 8d1464d4..8c306ea0 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h +++ b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu.h | |||
@@ -103,6 +103,7 @@ int vgpu_comm_sendrecv(struct tegra_vgpu_cmd_msg *msg, size_t size_in, | |||
103 | size_t size_out); | 103 | size_t size_out); |
104 | 104 | ||
105 | int vgpu_gp10b_init_hal(struct gk20a *g); | 105 | int vgpu_gp10b_init_hal(struct gk20a *g); |
106 | int vgpu_gv11b_init_hal(struct gk20a *g); | ||
106 | 107 | ||
107 | int vgpu_init_gpu_characteristics(struct gk20a *g); | 108 | int vgpu_init_gpu_characteristics(struct gk20a *g); |
108 | 109 | ||
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu_t19x.h b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu_t19x.h deleted file mode 100644 index faa5f772..00000000 --- a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu_t19x.h +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2017, 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_T19X_H_ | ||
18 | #define _VGPU_T19X_H_ | ||
19 | |||
20 | struct gk20a; | ||
21 | |||
22 | int vgpu_gv11b_init_hal(struct gk20a *g); | ||
23 | |||
24 | #define vgpu_t19x_init_hal(g) vgpu_gv11b_init_hal(g) | ||
25 | |||
26 | #define TEGRA_19x_VGPU_COMPAT_TEGRA "nvidia,gv11b-vgpu" | ||
27 | extern struct gk20a_platform gv11b_vgpu_tegra_platform; | ||
28 | #define t19x_vgpu_tegra_platform gv11b_vgpu_tegra_platform | ||
29 | |||
30 | #endif | ||