diff options
author | Shashank Singh <shashsingh@nvidia.com> | 2018-02-20 06:43:44 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-03-13 17:09:36 -0400 |
commit | b88d1c5a3e7b0bc79f84cbf2e376066db933bd0a (patch) | |
tree | fc32eb955184f9621c4ba9594ef5d138035e35c4 /drivers/gpu/nvgpu | |
parent | 23a855b8527e07c047a7c4d3671f39142d9ea432 (diff) |
gpu: nvgpu: vgpu: change commit_inst sequence in gr_alloc
Since rm-server is going to use gr sources from linux including the
subctx_gv11b.c. commit_inst should be done after global_ctx_buffer
map and commit. gv11b_update_subctx_header is called from rm-server
for alloc_subctx_header which is using global_ctx_buffer_va[PRIV_ACCESS_MAP_VA].
Jira VQRM-2982
Change-Id: Iff953bf0a12db2c6d69d35094969ab9485858025
Signed-off-by: Shashank Singh <shashsingh@nvidia.com>
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1661187
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Sourab Gupta <sourabg@nvidia.com>
Reviewed-by: Thomas Fleury <tfleury@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')
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gr_vgpu.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/gr_vgpu.c b/drivers/gpu/nvgpu/vgpu/gr_vgpu.c index e61996a1..4a3cf075 100644 --- a/drivers/gpu/nvgpu/vgpu/gr_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/gr_vgpu.c | |||
@@ -523,13 +523,6 @@ int vgpu_gr_alloc_obj_ctx(struct channel_gk20a *c, u32 class_num, u32 flags) | |||
523 | goto out; | 523 | goto out; |
524 | } | 524 | } |
525 | 525 | ||
526 | /* commit gr ctx buffer */ | ||
527 | err = g->ops.gr.commit_inst(c, gr_ctx->mem.gpu_va); | ||
528 | if (err) { | ||
529 | nvgpu_err(g, "fail to commit gr ctx buffer"); | ||
530 | goto out; | ||
531 | } | ||
532 | |||
533 | /* allocate patch buffer */ | 526 | /* allocate patch buffer */ |
534 | err = vgpu_gr_alloc_channel_patch_ctx(g, c); | 527 | err = vgpu_gr_alloc_channel_patch_ctx(g, c); |
535 | if (err) { | 528 | if (err) { |
@@ -550,6 +543,13 @@ int vgpu_gr_alloc_obj_ctx(struct channel_gk20a *c, u32 class_num, u32 flags) | |||
550 | goto out; | 543 | goto out; |
551 | } | 544 | } |
552 | 545 | ||
546 | /* commit gr ctx buffer */ | ||
547 | err = g->ops.gr.commit_inst(c, gr_ctx->mem.gpu_va); | ||
548 | if (err) { | ||
549 | nvgpu_err(g, "fail to commit gr ctx buffer"); | ||
550 | goto out; | ||
551 | } | ||
552 | |||
553 | /* load golden image */ | 553 | /* load golden image */ |
554 | err = gr_gk20a_elpg_protected_call(g, | 554 | err = gr_gk20a_elpg_protected_call(g, |
555 | vgpu_gr_load_golden_ctx_image(g, c)); | 555 | vgpu_gr_load_golden_ctx_image(g, c)); |