From 0cc118c08c30e54073e5b8729c859a08ddbe3785 Mon Sep 17 00:00:00 2001 From: Aingara Paramakuru Date: Wed, 12 Nov 2014 15:00:22 -0500 Subject: gpu: nvgpu: vgpu: fix crash during init gops->gr.detect_sm_arch was not populated for vgpu. Also, populate some members of the PMU VM struct as they are used to report GPU characteristics to userspace. Bug 1576949 Change-Id: I9ddc361d1418b942da97a82b553aac81f5f51182 Signed-off-by: Aingara Paramakuru Reviewed-on: http://git-master/r/601931 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Arto Merilainen Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/vgpu/mm_vgpu.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/gpu/nvgpu/vgpu/mm_vgpu.c') diff --git a/drivers/gpu/nvgpu/vgpu/mm_vgpu.c b/drivers/gpu/nvgpu/vgpu/mm_vgpu.c index adec4d31..eb67c01f 100644 --- a/drivers/gpu/nvgpu/vgpu/mm_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/mm_vgpu.c @@ -20,6 +20,8 @@ static int vgpu_init_mm_setup_sw(struct gk20a *g) { struct mm_gk20a *mm = &g->mm; + struct vm_gk20a *vm = &mm->pmu.vm; + u32 big_page_size = gk20a_get_platform(g->dev)->default_big_page_size; gk20a_dbg_fn(""); @@ -35,6 +37,12 @@ static int vgpu_init_mm_setup_sw(struct gk20a *g) gk20a_dbg_info("channel vm size: %dMB", (int)(mm->channel.size >> 20)); + /* gk20a_init_gpu_characteristics expects this to be populated */ + vm->big_page_size = big_page_size; + vm->compression_page_size = big_page_size; + vm->pde_stride = vm->big_page_size << 10; + vm->pde_stride_shift = ilog2(vm->pde_stride); + mm->sw_ready = true; return 0; -- cgit v1.2.2