summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_gr_gp10b.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/gp10b/vgpu_gr_gp10b.c')
-rw-r--r--drivers/gpu/nvgpu/vgpu/gp10b/vgpu_gr_gp10b.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_gr_gp10b.c b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_gr_gp10b.c
index ec2fcd8e..fa6109ad 100644
--- a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_gr_gp10b.c
+++ b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_gr_gp10b.c
@@ -31,7 +31,7 @@
31 31
32#include <nvgpu/hw/gp10b/hw_gr_gp10b.h> 32#include <nvgpu/hw/gp10b/hw_gr_gp10b.h>
33 33
34static void vgpu_gr_gp10b_free_gr_ctx(struct gk20a *g, struct vm_gk20a *vm, 34void vgpu_gr_gp10b_free_gr_ctx(struct gk20a *g, struct vm_gk20a *vm,
35 struct gr_ctx_desc *gr_ctx) 35 struct gr_ctx_desc *gr_ctx)
36{ 36{
37 struct tegra_vgpu_cmd_msg msg = {0}; 37 struct tegra_vgpu_cmd_msg msg = {0};
@@ -59,7 +59,7 @@ static void vgpu_gr_gp10b_free_gr_ctx(struct gk20a *g, struct vm_gk20a *vm,
59 nvgpu_kfree(g, gr_ctx); 59 nvgpu_kfree(g, gr_ctx);
60} 60}
61 61
62static int vgpu_gr_gp10b_alloc_gr_ctx(struct gk20a *g, 62int vgpu_gr_gp10b_alloc_gr_ctx(struct gk20a *g,
63 struct gr_ctx_desc **__gr_ctx, 63 struct gr_ctx_desc **__gr_ctx,
64 struct vm_gk20a *vm, 64 struct vm_gk20a *vm,
65 u32 class, 65 u32 class,
@@ -115,7 +115,7 @@ fail:
115 return err; 115 return err;
116} 116}
117 117
118static int vgpu_gr_gp10b_set_ctxsw_preemption_mode(struct gk20a *g, 118int vgpu_gr_gp10b_set_ctxsw_preemption_mode(struct gk20a *g,
119 struct gr_ctx_desc *gr_ctx, 119 struct gr_ctx_desc *gr_ctx,
120 struct vm_gk20a *vm, u32 class, 120 struct vm_gk20a *vm, u32 class,
121 u32 graphics_preempt_mode, 121 u32 graphics_preempt_mode,
@@ -267,7 +267,7 @@ fail:
267 return err; 267 return err;
268} 268}
269 269
270static int vgpu_gr_gp10b_set_preemption_mode(struct channel_gk20a *ch, 270int vgpu_gr_gp10b_set_preemption_mode(struct channel_gk20a *ch,
271 u32 graphics_preempt_mode, 271 u32 graphics_preempt_mode,
272 u32 compute_preempt_mode) 272 u32 compute_preempt_mode)
273{ 273{
@@ -316,7 +316,7 @@ static int vgpu_gr_gp10b_set_preemption_mode(struct channel_gk20a *ch,
316 return err; 316 return err;
317} 317}
318 318
319static int vgpu_gr_gp10b_init_ctx_state(struct gk20a *g) 319int vgpu_gr_gp10b_init_ctx_state(struct gk20a *g)
320{ 320{
321 struct vgpu_priv_data *priv = vgpu_get_priv_data(g); 321 struct vgpu_priv_data *priv = vgpu_get_priv_data(g);
322 int err; 322 int err;
@@ -334,14 +334,3 @@ static int vgpu_gr_gp10b_init_ctx_state(struct gk20a *g)
334 334
335 return 0; 335 return 0;
336} 336}
337
338void vgpu_gp10b_init_gr_ops(struct gpu_ops *gops)
339{
340 vgpu_gm20b_init_gr_ops(gops);
341 gops->gr.alloc_gr_ctx = vgpu_gr_gp10b_alloc_gr_ctx;
342 gops->gr.free_gr_ctx = vgpu_gr_gp10b_free_gr_ctx;
343 gops->gr.init_ctx_state = vgpu_gr_gp10b_init_ctx_state;
344 gops->gr.set_preemption_mode = vgpu_gr_gp10b_set_preemption_mode;
345 gops->gr.set_ctxsw_preemption_mode =
346 vgpu_gr_gp10b_set_ctxsw_preemption_mode;
347}