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>
This commit is contained in:
Shashank Singh
2018-02-20 17:13:44 +05:30
committed by mobile promotions
parent 23a855b852
commit b88d1c5a3e

View File

@@ -523,13 +523,6 @@ int vgpu_gr_alloc_obj_ctx(struct channel_gk20a *c, u32 class_num, u32 flags)
goto out;
}
/* commit gr ctx buffer */
err = g->ops.gr.commit_inst(c, gr_ctx->mem.gpu_va);
if (err) {
nvgpu_err(g, "fail to commit gr ctx buffer");
goto out;
}
/* allocate patch buffer */
err = vgpu_gr_alloc_channel_patch_ctx(g, c);
if (err) {
@@ -550,6 +543,13 @@ int vgpu_gr_alloc_obj_ctx(struct channel_gk20a *c, u32 class_num, u32 flags)
goto out;
}
/* commit gr ctx buffer */
err = g->ops.gr.commit_inst(c, gr_ctx->mem.gpu_va);
if (err) {
nvgpu_err(g, "fail to commit gr ctx buffer");
goto out;
}
/* load golden image */
err = gr_gk20a_elpg_protected_call(g,
vgpu_gr_load_golden_ctx_image(g, c));