From 03b87689025b86b145236a9c707e31a3d3214eb0 Mon Sep 17 00:00:00 2001 From: Sourab Gupta Date: Tue, 27 Mar 2018 19:39:21 +0530 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1683391 GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/ce2_gk20a.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gk20a/ce2_gk20a.c') 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, { struct gk20a_gpu_ctx *ce_ctx; struct gk20a_ce_app *ce_app = &g->ce_app; + struct nvgpu_gpfifo_args gpfifo_args; u32 ctx_id = ~0; int err = 0; @@ -458,8 +459,11 @@ u32 gk20a_ce_create_context(struct gk20a *g, goto end; } + gpfifo_args.num_entries = 1024; + gpfifo_args.num_inflight_jobs = 0; + gpfifo_args.flags = 0; /* allocate gpfifo (1024 should be more than enough) */ - err = gk20a_channel_alloc_gpfifo(ce_ctx->ch, 1024, 0, 0); + err = gk20a_channel_alloc_gpfifo(ce_ctx->ch, &gpfifo_args); if (err) { nvgpu_err(g, "ce: unable to allocate gpfifo"); goto end; -- cgit v1.2.2