From 4f3871309d5216b50179feed8f8024193b2224cf Mon Sep 17 00:00:00 2001 From: seshendra Gadagottu Date: Fri, 13 Jan 2017 13:34:24 -0800 Subject: 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 Reviewed-on: http://git-master/r/1282440 Reviewed-by: Alex Waterman Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gv11b/subctx_gv11b.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gv11b/subctx_gv11b.c') 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) { struct ctx_header_desc *ctx = &c->ch_ctx.ctx_header; struct gk20a *g = c->g; + struct gr_gk20a *gr = &g->gr; int ret = 0; gk20a_dbg_fn(""); @@ -51,7 +52,7 @@ int gv11b_alloc_subctx_header(struct channel_gk20a *c) if (ctx->mem.gpu_va == 0) { ret = gk20a_gmmu_alloc_attr_sys(g, DMA_ATTR_NO_KERNEL_MAPPING, - ctxsw_prog_fecs_header_v(), + gr->ctx_vars.golden_image_size, &ctx->mem); if (ret) { gk20a_err(dev_from_gk20a(g), -- cgit v1.2.2