gpu: nvgpu: vgpu: fix regressions causing crashes

Client OS was accessing gpu registers directly, resulting in a crash:

- Use gk20a version of init_gpu_characteristics
- Set cbc_ctrl callback to NULL

Bug 1749990
Bug 1749896

Change-Id: I7e5eea52c5d1d0c2ca7ca5e4d34dc4fc21f4e093
Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com>
Reviewed-on: http://git-master/r/1120473
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
Peter Daifuku
2016-04-01 09:51:42 -07:00
committed by Terje Bergstrom
parent 37155b65f1
commit cefc747ba2
2 changed files with 3 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
/*
* Virtualized GPU L2
*
* Copyright (c) 2014-2015 NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2014-2016 NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
@@ -82,4 +82,5 @@ void vgpu_init_ltc_ops(struct gpu_ops *gops)
gops->ltc.determine_L2_size_bytes = vgpu_determine_L2_size_bytes;
gops->ltc.init_comptags = vgpu_ltc_init_comptags;
gops->ltc.init_fs_state = vgpu_ltc_init_fs_state;
gops->ltc.cbc_ctrl = NULL;
}

View File

@@ -261,6 +261,7 @@ void vgpu_init_hal_common(struct gk20a *g)
vgpu_init_mm_ops(gops);
vgpu_init_debug_ops(gops);
vgpu_init_fecs_trace_ops(gops);
gops->chip_init_gpu_characteristics = gk20a_init_gpu_characteristics;
}
static int vgpu_init_hal(struct gk20a *g)