summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c
diff options
context:
space:
mode:
authorSourab Gupta <sourabg@nvidia.com>2018-03-27 10:09:21 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-04-05 08:22:54 -0400
commit03b87689025b86b145236a9c707e31a3d3214eb0 (patch)
treec9f1d756e50c24b69718a04778d88bb53f26ca3b /drivers/gpu/nvgpu/gk20a/ce2_gk20a.c
parent077de38dfbc37ca933e0f3456397a44a49b1202e (diff)
gpu: nvgpu: pass alloc_gpfifo args to gk20a_channel_alloc_gpfifo
The patch defines 'struct nvgpu_gpfifo_args' to be filled by alloc_gpfifo(_ex) ioctls and passed to the gk20a_channel_alloc_gpfifo function. This is required as a prep towards having the usermode submission support in the core channel core. Change-Id: I72acc00cc5558dd3623604da7d716bf849f0152c Signed-off-by: Sourab Gupta <sourabg@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1683391 GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/ce2_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/ce2_gk20a.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c
index 5841c72c..87eff813 100644
--- a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c
@@ -406,6 +406,7 @@ u32 gk20a_ce_create_context(struct gk20a *g,
406{ 406{
407 struct gk20a_gpu_ctx *ce_ctx; 407 struct gk20a_gpu_ctx *ce_ctx;
408 struct gk20a_ce_app *ce_app = &g->ce_app; 408 struct gk20a_ce_app *ce_app = &g->ce_app;
409 struct nvgpu_gpfifo_args gpfifo_args;
409 u32 ctx_id = ~0; 410 u32 ctx_id = ~0;
410 int err = 0; 411 int err = 0;
411 412
@@ -458,8 +459,11 @@ u32 gk20a_ce_create_context(struct gk20a *g,
458 goto end; 459 goto end;
459 } 460 }
460 461
462 gpfifo_args.num_entries = 1024;
463 gpfifo_args.num_inflight_jobs = 0;
464 gpfifo_args.flags = 0;
461 /* allocate gpfifo (1024 should be more than enough) */ 465 /* allocate gpfifo (1024 should be more than enough) */
462 err = gk20a_channel_alloc_gpfifo(ce_ctx->ch, 1024, 0, 0); 466 err = gk20a_channel_alloc_gpfifo(ce_ctx->ch, &gpfifo_args);
463 if (err) { 467 if (err) {
464 nvgpu_err(g, "ce: unable to allocate gpfifo"); 468 nvgpu_err(g, "ce: unable to allocate gpfifo");
465 goto end; 469 goto end;