summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c20
-rw-r--r--include/linux/tegra_vgpu_t19x.h2
2 files changed, 21 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c
index b9df58ec..f8f021b7 100644
--- a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c
+++ b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c
@@ -14,13 +14,31 @@
14#include <gk20a/gk20a.h> 14#include <gk20a/gk20a.h>
15#include <vgpu/gp10b/vgpu_fifo_gp10b.h> 15#include <vgpu/gp10b/vgpu_fifo_gp10b.h>
16 16
17#include "vgpu/vgpu.h"
18
17#include "vgpu_fifo_gv11b.h" 19#include "vgpu_fifo_gv11b.h"
18#include "vgpu_subctx_gv11b.h" 20#include "vgpu_subctx_gv11b.h"
19 21
22static int vgpu_gv11b_init_fifo_setup_hw(struct gk20a *g)
23{
24 struct fifo_gk20a *f = &g->fifo;
25 int err;
26
27 err = vgpu_get_attribute(vgpu_get_handle(g),
28 TEGRA_VGPU_ATTRIB_MAX_SUBCTX_COUNT,
29 &f->t19x.max_subctx_count);
30 if (err) {
31 nvgpu_err(g, "get max_subctx_count failed %d", err);
32 return err;
33 }
34
35 return 0;
36}
37
20void vgpu_gv11b_init_fifo_ops(struct gpu_ops *gops) 38void vgpu_gv11b_init_fifo_ops(struct gpu_ops *gops)
21{ 39{
22 vgpu_gp10b_init_fifo_ops(gops); 40 vgpu_gp10b_init_fifo_ops(gops);
23 41
24 gops->fifo.init_fifo_setup_hw = NULL; 42 gops->fifo.init_fifo_setup_hw = vgpu_gv11b_init_fifo_setup_hw;
25 gops->fifo.free_channel_ctx_header = vgpu_gv11b_free_subctx_header; 43 gops->fifo.free_channel_ctx_header = vgpu_gv11b_free_subctx_header;
26} 44}
diff --git a/include/linux/tegra_vgpu_t19x.h b/include/linux/tegra_vgpu_t19x.h
index f473275d..c2814f16 100644
--- a/include/linux/tegra_vgpu_t19x.h
+++ b/include/linux/tegra_vgpu_t19x.h
@@ -31,4 +31,6 @@ union tegra_vgpu_t19x_params {
31 struct tegra_vgpu_free_ctx_header_params free_ctx_header; 31 struct tegra_vgpu_free_ctx_header_params free_ctx_header;
32}; 32};
33 33
34#define TEGRA_VGPU_ATTRIB_MAX_SUBCTX_COUNT 100
35
34#endif 36#endif