diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2017-05-17 06:51:41 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-05-19 12:44:24 -0400 |
commit | d85aa0064b3e9e1de3f2583499963977286b0d25 (patch) | |
tree | 800703b555d5eabefbf3b92288d86b660b0e453a /drivers/gpu | |
parent | b7fca01b0e01544c3a66d2e05a8b99bcb621a004 (diff) |
gpu: nvgpu: check commit_inst err codes
gr_gk20a_init_golden_ctx_image() didn't check for error codes from
gr.commit_inst(). Add the missing checks.
Change-Id: I9f8449b2741c5a69cf65ad8191e9bc74c6ad1393
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/1483867
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 7bbac8cc..3486076e 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -1785,7 +1785,9 @@ restore_fe_go_idle: | |||
1785 | g->ops.gr.write_zcull_ptr(g, gold_mem, 0); | 1785 | g->ops.gr.write_zcull_ptr(g, gold_mem, 0); |
1786 | nvgpu_mem_end(g, ctxheader); | 1786 | nvgpu_mem_end(g, ctxheader); |
1787 | 1787 | ||
1788 | g->ops.gr.commit_inst(c, ch_ctx->global_ctx_buffer_va[GOLDEN_CTX_VA]); | 1788 | err = g->ops.gr.commit_inst(c, ch_ctx->global_ctx_buffer_va[GOLDEN_CTX_VA]); |
1789 | if (err) | ||
1790 | goto clean_up; | ||
1789 | 1791 | ||
1790 | gr_gk20a_fecs_ctx_image_save(c, gr_fecs_method_push_adr_wfi_golden_save_v()); | 1792 | gr_gk20a_fecs_ctx_image_save(c, gr_fecs_method_push_adr_wfi_golden_save_v()); |
1791 | 1793 | ||
@@ -1813,7 +1815,9 @@ restore_fe_go_idle: | |||
1813 | } | 1815 | } |
1814 | nvgpu_mem_end(g, ctxheader); | 1816 | nvgpu_mem_end(g, ctxheader); |
1815 | 1817 | ||
1816 | g->ops.gr.commit_inst(c, gr_mem->gpu_va); | 1818 | err = g->ops.gr.commit_inst(c, gr_mem->gpu_va); |
1819 | if (err) | ||
1820 | goto clean_up; | ||
1817 | 1821 | ||
1818 | gr->ctx_vars.golden_image_initialized = true; | 1822 | gr->ctx_vars.golden_image_initialized = true; |
1819 | 1823 | ||