diff options
author | Sourab Gupta <sourabg@nvidia.com> | 2018-03-27 10:09:21 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-04-05 08:22:54 -0400 |
commit | 03b87689025b86b145236a9c707e31a3d3214eb0 (patch) | |
tree | c9f1d756e50c24b69718a04778d88bb53f26ca3b /drivers/gpu/nvgpu/common/linux/cde.c | |
parent | 077de38dfbc37ca933e0f3456397a44a49b1202e (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/common/linux/cde.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/cde.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/cde.c b/drivers/gpu/nvgpu/common/linux/cde.c index b366acc4..e5441ac9 100644 --- a/drivers/gpu/nvgpu/common/linux/cde.c +++ b/drivers/gpu/nvgpu/common/linux/cde.c | |||
@@ -1277,6 +1277,7 @@ static int gk20a_cde_load(struct gk20a_cde_ctx *cde_ctx) | |||
1277 | struct channel_gk20a *ch; | 1277 | struct channel_gk20a *ch; |
1278 | struct tsg_gk20a *tsg; | 1278 | struct tsg_gk20a *tsg; |
1279 | struct gr_gk20a *gr = &g->gr; | 1279 | struct gr_gk20a *gr = &g->gr; |
1280 | struct nvgpu_gpfifo_args gpfifo_args; | ||
1280 | int err = 0; | 1281 | int err = 0; |
1281 | u64 vaddr; | 1282 | u64 vaddr; |
1282 | 1283 | ||
@@ -1316,8 +1317,11 @@ static int gk20a_cde_load(struct gk20a_cde_ctx *cde_ctx) | |||
1316 | goto err_alloc_gpfifo; | 1317 | goto err_alloc_gpfifo; |
1317 | } | 1318 | } |
1318 | 1319 | ||
1320 | gpfifo_args.num_entries = 1024; | ||
1321 | gpfifo_args.num_inflight_jobs = 0; | ||
1322 | gpfifo_args.flags = 0; | ||
1319 | /* allocate gpfifo (1024 should be more than enough) */ | 1323 | /* allocate gpfifo (1024 should be more than enough) */ |
1320 | err = gk20a_channel_alloc_gpfifo(ch, 1024, 0, 0); | 1324 | err = gk20a_channel_alloc_gpfifo(ch, &gpfifo_args); |
1321 | if (err) { | 1325 | if (err) { |
1322 | nvgpu_warn(g, "cde: unable to allocate gpfifo"); | 1326 | nvgpu_warn(g, "cde: unable to allocate gpfifo"); |
1323 | goto err_alloc_gpfifo; | 1327 | goto err_alloc_gpfifo; |