From 8c6a9fd1151299697037d58f33cfa306d8ac5d87 Mon Sep 17 00:00:00 2001 From: Sam Payne Date: Fri, 31 Oct 2014 14:27:33 -0700 Subject: Revert "gpu: nvgpu: GR and LTC HAL to use const structs" This reverts commit 41b82e97164138f45fbdaef6ab6939d82ca9419e. Change-Id: Iabd01fcb124e0d22cd9be62151a6552cbb27fc94 Signed-off-by: Sam Payne Reviewed-on: http://git-master/r/592221 Tested-by: Hoang Pham GVS: Gerrit_Virtual_Submit Reviewed-by: Mitch Luban --- drivers/gpu/nvgpu/gm20b/ltc_gm20b.c | 38 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 20 deletions(-) (limited to 'drivers/gpu/nvgpu/gm20b/ltc_gm20b.c') diff --git a/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c b/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c index 2a888e88..a089b59c 100644 --- a/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c @@ -388,26 +388,24 @@ static int gm20b_determine_L2_size_bytes(struct gk20a *g) return cache_size; } -static struct gpu_ltc_ops gm20b_ltc_ops = { - .determine_L2_size_bytes = gm20b_determine_L2_size_bytes, - .set_max_ways_evict_last = gk20a_ltc_set_max_ways_evict_last, - .set_zbc_color_entry = gk20a_ltc_set_zbc_color_entry, - .set_zbc_depth_entry = gk20a_ltc_set_zbc_depth_entry, - .init_cbc = gk20a_ltc_init_cbc, -#ifdef CONFIG_DEBUG_FS - .sync_debugfs = gk20a_ltc_sync_debugfs, -#endif - /* GM20b specific ops. */ - .init_fs_state = gm20b_ltc_init_fs_state, - .init_comptags = gm20b_ltc_init_comptags, - .cbc_ctrl = gm20b_ltc_cbc_ctrl, - .elpg_flush = gm20b_ltc_g_elpg_flush_locked, - .isr = gm20b_ltc_isr, - .cbc_fix_config = gm20b_ltc_cbc_fix_config, - .flush = gm20b_flush_ltc -}; - void gm20b_init_ltc(struct gpu_ops *gops) { - gops->ltc = &gm20b_ltc_ops; + /* Gk20a reused ops. */ + gops->ltc.determine_L2_size_bytes = gm20b_determine_L2_size_bytes; + gops->ltc.set_max_ways_evict_last = gk20a_ltc_set_max_ways_evict_last; + gops->ltc.set_zbc_color_entry = gk20a_ltc_set_zbc_color_entry; + gops->ltc.set_zbc_depth_entry = gk20a_ltc_set_zbc_depth_entry; + gops->ltc.init_cbc = gk20a_ltc_init_cbc; + + /* GM20b specific ops. */ + gops->ltc.init_fs_state = gm20b_ltc_init_fs_state; + gops->ltc.init_comptags = gm20b_ltc_init_comptags; + gops->ltc.cbc_ctrl = gm20b_ltc_cbc_ctrl; + gops->ltc.elpg_flush = gm20b_ltc_g_elpg_flush_locked; + gops->ltc.isr = gm20b_ltc_isr; + gops->ltc.cbc_fix_config = gm20b_ltc_cbc_fix_config; + gops->ltc.flush = gm20b_flush_ltc; +#ifdef CONFIG_DEBUG_FS + gops->ltc.sync_debugfs = gk20a_ltc_sync_debugfs; +#endif } -- cgit v1.2.2