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/gm20b/ltc_gm20b.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/gm20b/ltc_gm20b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/ltc_gm20b.c | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c b/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c index a089b59c..2a888e88 100644 --- a/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c | |||
@@ -388,24 +388,26 @@ static int gm20b_determine_L2_size_bytes(struct gk20a *g) | |||
388 | return cache_size; | 388 | return cache_size; |
389 | } | 389 | } |
390 | 390 | ||
391 | void gm20b_init_ltc(struct gpu_ops *gops) | 391 | static struct gpu_ltc_ops gm20b_ltc_ops = { |
392 | { | 392 | .determine_L2_size_bytes = gm20b_determine_L2_size_bytes, |
393 | /* Gk20a reused ops. */ | 393 | .set_max_ways_evict_last = gk20a_ltc_set_max_ways_evict_last, |
394 | gops->ltc.determine_L2_size_bytes = gm20b_determine_L2_size_bytes; | 394 | .set_zbc_color_entry = gk20a_ltc_set_zbc_color_entry, |
395 | gops->ltc.set_max_ways_evict_last = gk20a_ltc_set_max_ways_evict_last; | 395 | .set_zbc_depth_entry = gk20a_ltc_set_zbc_depth_entry, |
396 | gops->ltc.set_zbc_color_entry = gk20a_ltc_set_zbc_color_entry; | 396 | .init_cbc = gk20a_ltc_init_cbc, |
397 | gops->ltc.set_zbc_depth_entry = gk20a_ltc_set_zbc_depth_entry; | ||
398 | gops->ltc.init_cbc = gk20a_ltc_init_cbc; | ||
399 | |||
400 | /* GM20b specific ops. */ | ||
401 | gops->ltc.init_fs_state = gm20b_ltc_init_fs_state; | ||
402 | gops->ltc.init_comptags = gm20b_ltc_init_comptags; | ||
403 | gops->ltc.cbc_ctrl = gm20b_ltc_cbc_ctrl; | ||
404 | gops->ltc.elpg_flush = gm20b_ltc_g_elpg_flush_locked; | ||
405 | gops->ltc.isr = gm20b_ltc_isr; | ||
406 | gops->ltc.cbc_fix_config = gm20b_ltc_cbc_fix_config; | ||
407 | gops->ltc.flush = gm20b_flush_ltc; | ||
408 | #ifdef CONFIG_DEBUG_FS | 397 | #ifdef CONFIG_DEBUG_FS |
409 | gops->ltc.sync_debugfs = gk20a_ltc_sync_debugfs; | 398 | .sync_debugfs = gk20a_ltc_sync_debugfs, |
410 | #endif | 399 | #endif |
400 | /* GM20b specific ops. */ | ||
401 | .init_fs_state = gm20b_ltc_init_fs_state, | ||
402 | .init_comptags = gm20b_ltc_init_comptags, | ||
403 | .cbc_ctrl = gm20b_ltc_cbc_ctrl, | ||
404 | .elpg_flush = gm20b_ltc_g_elpg_flush_locked, | ||
405 | .isr = gm20b_ltc_isr, | ||
406 | .cbc_fix_config = gm20b_ltc_cbc_fix_config, | ||
407 | .flush = gm20b_flush_ltc | ||
408 | }; | ||
409 | |||
410 | void gm20b_init_ltc(struct gpu_ops *gops) | ||
411 | { | ||
412 | gops->ltc = &gm20b_ltc_ops; | ||
411 | } | 413 | } |