From cefc747ba2cdf6ccb98ecf18e63b6911db3be019 Mon Sep 17 00:00:00 2001 From: Peter Daifuku Date: Fri, 1 Apr 2016 09:51:42 -0700 Subject: 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 Reviewed-on: http://git-master/r/1120473 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/vgpu/ltc_vgpu.c | 3 ++- drivers/gpu/nvgpu/vgpu/vgpu.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/gpu') diff --git a/drivers/gpu/nvgpu/vgpu/ltc_vgpu.c b/drivers/gpu/nvgpu/vgpu/ltc_vgpu.c index 76ee5ec9..1adb8b22 100644 --- a/drivers/gpu/nvgpu/vgpu/ltc_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/ltc_vgpu.c @@ -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; } diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c index 4750d7ee..ab063c9b 100644 --- a/drivers/gpu/nvgpu/vgpu/vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/vgpu.c @@ -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) -- cgit v1.2.2