From 57fb527a7e33384341fc18f1f918d5a8225057f5 Mon Sep 17 00:00:00 2001 From: Peter Daifuku Date: Fri, 6 Oct 2017 16:27:14 -0700 Subject: gpu: nvgpu: vgpu: flatten out vgpu hal Instead of calling the native HAL init function then adding multiple layers of modification for VGPU, flatten out the sequence so that all entry points are set statically and visible in a single file. JIRA ESRM-30 Change-Id: Ie424abb48bce5038874851d399baac5e4bb7d27c Signed-off-by: Peter Daifuku Reviewed-on: https://git-master.nvidia.com/r/1574616 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/vgpu/vgpu.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'drivers/gpu/nvgpu/vgpu/vgpu.c') diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c index b63202c1..7949ff24 100644 --- a/drivers/gpu/nvgpu/vgpu/vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/vgpu.c @@ -378,7 +378,7 @@ int vgpu_init_gpu_characteristics(struct gk20a *g) return 0; } -static int vgpu_read_ptimer(struct gk20a *g, u64 *value) +int vgpu_read_ptimer(struct gk20a *g, u64 *value) { struct tegra_vgpu_cmd_msg msg = {0}; struct tegra_vgpu_read_ptimer_params *p = &msg.params.read_ptimer; @@ -441,27 +441,6 @@ int vgpu_get_timestamps_zipper(struct gk20a *g, return err; } -void vgpu_init_hal_common(struct gk20a *g) -{ - struct gpu_ops *gops = &g->ops; - - vgpu_init_fifo_ops(gops); - vgpu_init_gr_ops(gops); - vgpu_init_ltc_ops(gops); - vgpu_init_mm_ops(gops); - vgpu_init_debug_ops(gops); - vgpu_init_dbg_session_ops(gops); - vgpu_init_fecs_trace_ops(gops); - vgpu_init_tsg_ops(gops); -#if defined(CONFIG_GK20A_CYCLE_STATS) - vgpu_init_css_ops(gops); -#endif - vgpu_init_ce2_ops(gops); - gops->chip_init_gpu_characteristics = vgpu_init_gpu_characteristics; - gops->bus.read_ptimer = vgpu_read_ptimer; - gops->bus.get_timestamps_zipper = vgpu_get_timestamps_zipper; -} - static int vgpu_init_hal(struct gk20a *g) { u32 ver = g->gpu_characteristics.arch + g->gpu_characteristics.impl; -- cgit v1.2.2