diff options
author | seshendra Gadagottu <sgadagottu@nvidia.com> | 2017-01-13 16:34:24 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-01-20 13:54:17 -0500 |
commit | 4f3871309d5216b50179feed8f8024193b2224cf (patch) | |
tree | 99686485e37e24c7a6b4328d61e34589135d8ddc /drivers/gpu/nvgpu/gv11b/subctx_gv11b.c | |
parent | 3a4a7d196a6a7fd256052cded45d6763c20dd3f6 (diff) |
gpu: nvgpu: gv11b: restore golden context
Restore golden context correctly with subcontext header.
Increase subctx header size to hold complete golden context.
Also fill function pointer for freeing context header.
Bug 1834201
Change-Id: Id8a3437bc437fef02ee15333c1163290217d34d1
Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: http://git-master/r/1282440
Reviewed-by: Alex Waterman <alexw@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/subctx_gv11b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/subctx_gv11b.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c b/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c index 3acc53f6..b0d0a192 100644 --- a/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c | |||
@@ -44,6 +44,7 @@ int gv11b_alloc_subctx_header(struct channel_gk20a *c) | |||
44 | { | 44 | { |
45 | struct ctx_header_desc *ctx = &c->ch_ctx.ctx_header; | 45 | struct ctx_header_desc *ctx = &c->ch_ctx.ctx_header; |
46 | struct gk20a *g = c->g; | 46 | struct gk20a *g = c->g; |
47 | struct gr_gk20a *gr = &g->gr; | ||
47 | int ret = 0; | 48 | int ret = 0; |
48 | 49 | ||
49 | gk20a_dbg_fn(""); | 50 | gk20a_dbg_fn(""); |
@@ -51,7 +52,7 @@ int gv11b_alloc_subctx_header(struct channel_gk20a *c) | |||
51 | if (ctx->mem.gpu_va == 0) { | 52 | if (ctx->mem.gpu_va == 0) { |
52 | ret = gk20a_gmmu_alloc_attr_sys(g, | 53 | ret = gk20a_gmmu_alloc_attr_sys(g, |
53 | DMA_ATTR_NO_KERNEL_MAPPING, | 54 | DMA_ATTR_NO_KERNEL_MAPPING, |
54 | ctxsw_prog_fecs_header_v(), | 55 | gr->ctx_vars.golden_image_size, |
55 | &ctx->mem); | 56 | &ctx->mem); |
56 | if (ret) { | 57 | if (ret) { |
57 | gk20a_err(dev_from_gk20a(g), | 58 | gk20a_err(dev_from_gk20a(g), |