From 7ae3c070da0c8adc52a606129c8c5c37191add30 Mon Sep 17 00:00:00 2001 From: Aparna Das Date: Wed, 29 Nov 2017 16:39:32 -0800 Subject: gpu: nvgpu: vgpu: modify subcontext header size Per veid header mode is enabled for subcontext header. Allocate only context header size for subcontext header. Jira EVLR-2073 Change-Id: I2761dcac7e8e765acb6db22241e3a9214867f885 Signed-off-by: Aparna Das Reviewed-on: https://git-master.nvidia.com/r/1607627 Reviewed-by: Richard Zhao Reviewed-by: Alex Waterman Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Nirav Patel Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_subctx_gv11b.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_subctx_gv11b.c b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_subctx_gv11b.c index 6d8785e4..1e2de14d 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_subctx_gv11b.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_subctx_gv11b.c @@ -17,6 +17,7 @@ #include "gk20a/gk20a.h" #include "common/linux/vgpu/vgpu.h" #include +#include int vgpu_gv11b_alloc_subctx_header(struct channel_gk20a *c) { @@ -24,14 +25,13 @@ int vgpu_gv11b_alloc_subctx_header(struct channel_gk20a *c) struct tegra_vgpu_cmd_msg msg = {}; struct tegra_vgpu_alloc_ctx_header_params *p = &msg.params.t19x.alloc_ctx_header; - struct gr_gk20a *gr = &c->g->gr; int err; msg.cmd = TEGRA_VGPU_CMD_ALLOC_CTX_HEADER; msg.handle = vgpu_get_handle(c->g); p->ch_handle = c->virt_ctx; p->ctx_header_va = __nvgpu_vm_alloc_va(c->vm, - gr->ctx_vars.golden_image_size, + ctxsw_prog_fecs_header_v(), gmmu_page_size_kernel); if (!p->ctx_header_va) { nvgpu_err(c->g, "alloc va failed for ctx_header"); -- cgit v1.2.2