diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2014-10-27 05:06:59 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:11:54 -0400 |
commit | 2d5ff668cbc6a932df2c9cf79627d1d340e5c2c0 (patch) | |
tree | 1d9bc4b774a9c2cea339891eaef3af5b87ee354d /drivers/gpu/nvgpu/gk20a/ltc_gk20a.c | |
parent | 23a182aaa61d120c965f1bce09609cc14d4e14eb (diff) |
gpu: nvgpu: GR and LTC HAL to use const structs
Convert GR and LTC HALs to use const structs, and initialize them
with macros.
Bug 1567274
Change-Id: Ia3f24a5eccb27578d9cba69755f636818d11275c
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/590371
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/ltc_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/ltc_gk20a.c | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ltc_gk20a.c b/drivers/gpu/nvgpu/gk20a/ltc_gk20a.c index aa094dc7..92dac449 100644 --- a/drivers/gpu/nvgpu/gk20a/ltc_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/ltc_gk20a.c | |||
@@ -265,19 +265,24 @@ static int gk20a_determine_L2_size_bytes(struct gk20a *g) | |||
265 | return cache_size; | 265 | return cache_size; |
266 | } | 266 | } |
267 | 267 | ||
268 | void gk20a_init_ltc(struct gpu_ops *gops) | 268 | static const struct gpu_ltc_ops gk20a_ltc_ops = { |
269 | { | 269 | .determine_L2_size_bytes = gk20a_determine_L2_size_bytes, |
270 | gops->ltc.determine_L2_size_bytes = gk20a_determine_L2_size_bytes; | 270 | .set_max_ways_evict_last = gk20a_ltc_set_max_ways_evict_last, |
271 | gops->ltc.set_max_ways_evict_last = gk20a_ltc_set_max_ways_evict_last; | 271 | .init_comptags = gk20a_ltc_init_comptags, |
272 | gops->ltc.init_comptags = gk20a_ltc_init_comptags; | 272 | .cbc_ctrl = gk20a_ltc_cbc_ctrl, |
273 | gops->ltc.cbc_ctrl = gk20a_ltc_cbc_ctrl; | 273 | .set_zbc_color_entry = gk20a_ltc_set_zbc_color_entry, |
274 | gops->ltc.set_zbc_color_entry = gk20a_ltc_set_zbc_color_entry; | 274 | .set_zbc_depth_entry = gk20a_ltc_set_zbc_depth_entry, |
275 | gops->ltc.set_zbc_depth_entry = gk20a_ltc_set_zbc_depth_entry; | 275 | .init_cbc = gk20a_ltc_init_cbc, |
276 | gops->ltc.init_cbc = gk20a_ltc_init_cbc; | ||
277 | #ifdef CONFIG_DEBUG_FS | 276 | #ifdef CONFIG_DEBUG_FS |
278 | gops->ltc.sync_debugfs = gk20a_ltc_sync_debugfs; | 277 | .sync_debugfs = gk20a_ltc_sync_debugfs, |
279 | #endif | 278 | #endif |
280 | gops->ltc.elpg_flush = gk20a_mm_g_elpg_flush_locked; | 279 | .elpg_flush = gk20a_mm_g_elpg_flush_locked, |
281 | gops->ltc.init_fs_state = gk20a_ltc_init_fs_state; | 280 | .init_fs_state = gk20a_ltc_init_fs_state, |
282 | gops->ltc.isr = gk20a_ltc_isr; | 281 | .isr = gk20a_ltc_isr |
282 | |||
283 | }; | ||
284 | |||
285 | void gk20a_init_ltc(struct gpu_ops *gops) | ||
286 | { | ||
287 | gops->ltc = &gk20a_ltc_ops; | ||
283 | } | 288 | } |