diff options
author | Aingara Paramakuru <aparamakuru@nvidia.com> | 2014-11-12 15:00:22 -0500 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:12:13 -0400 |
commit | 0cc118c08c30e54073e5b8729c859a08ddbe3785 (patch) | |
tree | 26adeaa2f81290bd6fe1300a5e779309afc07775 /drivers/gpu/nvgpu/vgpu/mm_vgpu.c | |
parent | 3fc88e50b84d13ff1e6ddaa910105d7e2f247c38 (diff) |
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 <aparamakuru@nvidia.com>
Reviewed-on: http://git-master/r/601931
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/mm_vgpu.c')
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/mm_vgpu.c | 8 |
1 files changed, 8 insertions, 0 deletions
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 @@ | |||
20 | static int vgpu_init_mm_setup_sw(struct gk20a *g) | 20 | static int vgpu_init_mm_setup_sw(struct gk20a *g) |
21 | { | 21 | { |
22 | struct mm_gk20a *mm = &g->mm; | 22 | struct mm_gk20a *mm = &g->mm; |
23 | struct vm_gk20a *vm = &mm->pmu.vm; | ||
24 | u32 big_page_size = gk20a_get_platform(g->dev)->default_big_page_size; | ||
23 | 25 | ||
24 | gk20a_dbg_fn(""); | 26 | gk20a_dbg_fn(""); |
25 | 27 | ||
@@ -35,6 +37,12 @@ static int vgpu_init_mm_setup_sw(struct gk20a *g) | |||
35 | 37 | ||
36 | gk20a_dbg_info("channel vm size: %dMB", (int)(mm->channel.size >> 20)); | 38 | gk20a_dbg_info("channel vm size: %dMB", (int)(mm->channel.size >> 20)); |
37 | 39 | ||
40 | /* gk20a_init_gpu_characteristics expects this to be populated */ | ||
41 | vm->big_page_size = big_page_size; | ||
42 | vm->compression_page_size = big_page_size; | ||
43 | vm->pde_stride = vm->big_page_size << 10; | ||
44 | vm->pde_stride_shift = ilog2(vm->pde_stride); | ||
45 | |||
38 | mm->sw_ready = true; | 46 | mm->sw_ready = true; |
39 | 47 | ||
40 | return 0; | 48 | return 0; |