summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c
diff options
context:
space:
mode:
authorseshendra Gadagottu <sgadagottu@nvidia.com>2017-09-14 19:32:11 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-09-19 20:45:30 -0400
commitb454d30d89d3a3830fc44039ec543286444e9e13 (patch)
treea6ff27f97fbd198ebf74b978a26ac814d49b0e18 /drivers/gpu/nvgpu/gv11b/subctx_gv11b.c
parent0420dd383e9aca0c764ad88979f88292603198d9 (diff)
gpu: nvgpu: gv11b: enable per veid header for subctx
Enable per veid header mode for subcontext header. Allocated only context header size for subcontext header. Bug 1958308 Change-Id: I6b45987eed968252326a366650fefd807975b70f Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1562681 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/subctx_gv11b.c')
-rw-r--r--drivers/gpu/nvgpu/gv11b/subctx_gv11b.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c b/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c
index 4f64843c..ee89ecc2 100644
--- a/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c
@@ -53,7 +53,6 @@ int gv11b_alloc_subctx_header(struct channel_gk20a *c)
53{ 53{
54 struct ctx_header_desc *ctx = &c->ch_ctx.ctx_header; 54 struct ctx_header_desc *ctx = &c->ch_ctx.ctx_header;
55 struct gk20a *g = c->g; 55 struct gk20a *g = c->g;
56 struct gr_gk20a *gr = &g->gr;
57 int ret = 0; 56 int ret = 0;
58 57
59 nvgpu_log(g, gpu_dbg_fn, "gv11b_alloc_subctx_header"); 58 nvgpu_log(g, gpu_dbg_fn, "gv11b_alloc_subctx_header");
@@ -61,7 +60,7 @@ int gv11b_alloc_subctx_header(struct channel_gk20a *c)
61 if (ctx->mem.gpu_va == 0) { 60 if (ctx->mem.gpu_va == 0) {
62 ret = nvgpu_dma_alloc_flags_sys(g, 61 ret = nvgpu_dma_alloc_flags_sys(g,
63 NVGPU_DMA_NO_KERNEL_MAPPING, 62 NVGPU_DMA_NO_KERNEL_MAPPING,
64 gr->ctx_vars.golden_image_size, 63 ctxsw_prog_fecs_header_v(),
65 &ctx->mem); 64 &ctx->mem);
66 if (ret) { 65 if (ret) {
67 nvgpu_err(g, "failed to allocate sub ctx header"); 66 nvgpu_err(g, "failed to allocate sub ctx header");
@@ -124,6 +123,10 @@ int gv11b_update_subctx_header(struct channel_gk20a *c, u64 gpu_va)
124 ctxsw_prog_main_image_context_buffer_ptr_hi_o(), addr_hi); 123 ctxsw_prog_main_image_context_buffer_ptr_hi_o(), addr_hi);
125 nvgpu_mem_wr(g, gr_mem, 124 nvgpu_mem_wr(g, gr_mem,
126 ctxsw_prog_main_image_context_buffer_ptr_o(), addr_lo); 125 ctxsw_prog_main_image_context_buffer_ptr_o(), addr_lo);
126
127 nvgpu_mem_wr(g, gr_mem,
128 ctxsw_prog_main_image_ctl_o(),
129 ctxsw_prog_main_image_ctl_type_per_veid_header_v());
127 nvgpu_mem_end(g, gr_mem); 130 nvgpu_mem_end(g, gr_mem);
128 return ret; 131 return ret;
129} 132}