diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2017-05-16 08:37:02 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-05-17 12:14:45 -0400 |
commit | 808af68d962b85594c2accd1069c6a2de35c50e4 (patch) | |
tree | ad9b123704e5d410dc3a284747faea52020447d6 /drivers/gpu/nvgpu/gv11b | |
parent | df03ec9e3064b027fe5459675f445fb591ef96ee (diff) |
gpu: nvgpu: gv11b: check subctx header err codes
React to possible errors in gr_gv11b_commit_inst() from allocating and
updating subcontext header.
Bug 1927306
Change-Id: I668e13ce13af296e9a7badb3b167fa7a7cd26212
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/1483043
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/gr_gv11b.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c index 46626bb7..179c7d33 100644 --- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c | |||
@@ -1436,12 +1436,17 @@ static int gr_gv11b_commit_inst(struct channel_gk20a *c, u64 gpu_va) | |||
1436 | u32 addr_lo; | 1436 | u32 addr_lo; |
1437 | u32 addr_hi; | 1437 | u32 addr_hi; |
1438 | struct ctx_header_desc *ctx; | 1438 | struct ctx_header_desc *ctx; |
1439 | int err; | ||
1439 | 1440 | ||
1440 | gk20a_dbg_fn(""); | 1441 | gk20a_dbg_fn(""); |
1441 | 1442 | ||
1442 | gv11b_alloc_subctx_header(c); | 1443 | err = gv11b_alloc_subctx_header(c); |
1444 | if (err) | ||
1445 | return err; | ||
1443 | 1446 | ||
1444 | gv11b_update_subctx_header(c, gpu_va); | 1447 | err = gv11b_update_subctx_header(c, gpu_va); |
1448 | if (err) | ||
1449 | return err; | ||
1445 | 1450 | ||
1446 | ctx = &c->ch_ctx.ctx_header; | 1451 | ctx = &c->ch_ctx.ctx_header; |
1447 | addr_lo = u64_lo32(ctx->mem.gpu_va) >> ram_in_base_shift_v(); | 1452 | addr_lo = u64_lo32(ctx->mem.gpu_va) >> ram_in_base_shift_v(); |