diff options
author | Sunny He <suhe@nvidia.com> | 2017-06-30 13:31:31 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-07-07 13:35:24 -0400 |
commit | 858a204362a385f076b057b6196fd89f7edb839b (patch) | |
tree | b0f8dc16d297b406e398f02d2ae4b8077cf65fe0 /drivers/gpu/nvgpu/gm20b/hal_gm20b.c | |
parent | 997ea5cef3dcd55b2281a7a8dcf452b743bc01f3 (diff) |
gpu: nvgpu: Reorg cde HAL initialization
Reorganize HAL initialization to remove inheritance and construct
the gpu_ops struct at compile time. This patch only covers the cde
sub-module of the gpu_ops struct.
Perform HAL function assignments in hal_gxxxx.c through the
population of a chip-specific copy of gpu_ops.
Jira NVGPU-74
Change-Id: I9343ce4985eb941a2610f5f11e8f01269ab68481
Signed-off-by: Sunny He <suhe@nvidia.com>
Reviewed-on: https://git-master/r/1511673
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/hal_gm20b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/hal_gm20b.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c index 4d2e56d5..b16289f9 100644 --- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c | |||
@@ -199,6 +199,9 @@ static const struct gpu_ops gm20b_ops = { | |||
199 | .pg_gr_load_gating_prod = | 199 | .pg_gr_load_gating_prod = |
200 | gr_gm20b_pg_gr_load_gating_prod, | 200 | gr_gm20b_pg_gr_load_gating_prod, |
201 | }, | 201 | }, |
202 | .cde = { | ||
203 | .get_program_numbers = gm20b_cde_get_program_numbers | ||
204 | }, | ||
202 | .chip_init_gpu_characteristics = gk20a_init_gpu_characteristics, | 205 | .chip_init_gpu_characteristics = gk20a_init_gpu_characteristics, |
203 | .get_litter_value = gm20b_get_litter_value, | 206 | .get_litter_value = gm20b_get_litter_value, |
204 | }; | 207 | }; |
@@ -211,6 +214,7 @@ int gm20b_init_hal(struct gk20a *g) | |||
211 | 214 | ||
212 | gops->ltc = gm20b_ops.ltc; | 215 | gops->ltc = gm20b_ops.ltc; |
213 | gops->clock_gating = gm20b_ops.clock_gating; | 216 | gops->clock_gating = gm20b_ops.clock_gating; |
217 | gops->cde = gm20b_ops.cde; | ||
214 | 218 | ||
215 | /* Lone functions */ | 219 | /* Lone functions */ |
216 | gops->chip_init_gpu_characteristics = | 220 | gops->chip_init_gpu_characteristics = |
@@ -261,7 +265,6 @@ int gm20b_init_hal(struct gk20a *g) | |||
261 | gm20b_init_regops(gops); | 265 | gm20b_init_regops(gops); |
262 | gk20a_init_debug_ops(gops); | 266 | gk20a_init_debug_ops(gops); |
263 | gk20a_init_dbg_session_ops(gops); | 267 | gk20a_init_dbg_session_ops(gops); |
264 | gm20b_init_cde_ops(gops); | ||
265 | gm20b_init_therm_ops(gops); | 268 | gm20b_init_therm_ops(gops); |
266 | gk20a_init_tsg_ops(gops); | 269 | gk20a_init_tsg_ops(gops); |
267 | #if defined(CONFIG_GK20A_CYCLE_STATS) | 270 | #if defined(CONFIG_GK20A_CYCLE_STATS) |