diff options
author | Shashank Singh <shashsingh@nvidia.com> | 2018-02-16 07:24:51 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-03-13 17:09:40 -0400 |
commit | 1d986dc33eae7cb56cd0a1beded5ba858f0535b9 (patch) | |
tree | 79120123b0c09693d36086ea134b2bc6f623a6d3 /drivers/gpu/nvgpu/vgpu/gr_vgpu.c | |
parent | b88d1c5a3e7b0bc79f84cbf2e376066db933bd0a (diff) |
gpu: nvgpu: add tsg_id to vgpu_gr_ctx struct
To reuse linux gr code for QNX tsg_id will be required during alloc_gr_ctx.
rm-server will reuse the gr_ctx from tsg and would not allocate it.
Jira VQRM-2982
Change-Id: I236deb181b89a38e70dedca4190a4275be9f0b28
Signed-off-by: Shashank Singh <shashsingh@nvidia.com>
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1659907
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-by: Sourab Gupta <sourabg@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/gr_vgpu.c')
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gr_vgpu.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/gr_vgpu.c b/drivers/gpu/nvgpu/vgpu/gr_vgpu.c index 4a3cf075..c7996fd9 100644 --- a/drivers/gpu/nvgpu/vgpu/gr_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/gr_vgpu.c | |||
@@ -302,6 +302,7 @@ int vgpu_gr_alloc_gr_ctx(struct gk20a *g, | |||
302 | p->as_handle = vm->handle; | 302 | p->as_handle = vm->handle; |
303 | p->gr_ctx_va = gr_ctx->mem.gpu_va; | 303 | p->gr_ctx_va = gr_ctx->mem.gpu_va; |
304 | p->class_num = class; | 304 | p->class_num = class; |
305 | p->tsg_id = gr_ctx->tsgid; | ||
305 | err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg)); | 306 | err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg)); |
306 | err = err ? err : msg.ret; | 307 | err = err ? err : msg.ret; |
307 | 308 | ||
@@ -501,6 +502,7 @@ int vgpu_gr_alloc_obj_ctx(struct channel_gk20a *c, u32 class_num, u32 flags) | |||
501 | if (!nvgpu_mem_is_valid(&gr_ctx->mem)) { | 502 | if (!nvgpu_mem_is_valid(&gr_ctx->mem)) { |
502 | tsg->vm = c->vm; | 503 | tsg->vm = c->vm; |
503 | nvgpu_vm_get(tsg->vm); | 504 | nvgpu_vm_get(tsg->vm); |
505 | gr_ctx->tsgid = tsg->tsgid; | ||
504 | err = g->ops.gr.alloc_gr_ctx(g, gr_ctx, | 506 | err = g->ops.gr.alloc_gr_ctx(g, gr_ctx, |
505 | c->vm, | 507 | c->vm, |
506 | class_num, | 508 | class_num, |