summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
diff options
context:
space:
mode:
authorSunny He <suhe@nvidia.com>2017-06-30 13:31:31 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-07-07 13:35:24 -0400
commit858a204362a385f076b057b6196fd89f7edb839b (patch)
treeb0f8dc16d297b406e398f02d2ae4b8077cf65fe0 /drivers/gpu/nvgpu/gp10b/hal_gp10b.c
parent997ea5cef3dcd55b2281a7a8dcf452b743bc01f3 (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/gp10b/hal_gp10b.c')
-rw-r--r--drivers/gpu/nvgpu/gp10b/hal_gp10b.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
index 98ff55cc..8609605b 100644
--- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
@@ -207,6 +207,11 @@ static const struct gpu_ops gp10b_ops = {
207 .pg_gr_load_gating_prod = 207 .pg_gr_load_gating_prod =
208 gr_gp10b_pg_gr_load_gating_prod, 208 gr_gp10b_pg_gr_load_gating_prod,
209 }, 209 },
210 .cde = {
211 .get_program_numbers = gp10b_cde_get_program_numbers,
212 .need_scatter_buffer = gp10b_need_scatter_buffer,
213 .populate_scatter_buffer = gp10b_populate_scatter_buffer,
214 },
210 .chip_init_gpu_characteristics = gp10b_init_gpu_characteristics, 215 .chip_init_gpu_characteristics = gp10b_init_gpu_characteristics,
211 .get_litter_value = gp10b_get_litter_value, 216 .get_litter_value = gp10b_get_litter_value,
212}; 217};
@@ -219,6 +224,7 @@ int gp10b_init_hal(struct gk20a *g)
219 224
220 gops->ltc = gp10b_ops.ltc; 225 gops->ltc = gp10b_ops.ltc;
221 gops->clock_gating = gp10b_ops.clock_gating; 226 gops->clock_gating = gp10b_ops.clock_gating;
227 gops->cde = gp10b_ops.cde;
222 228
223 /* Lone Functions */ 229 /* Lone Functions */
224 gops->chip_init_gpu_characteristics = 230 gops->chip_init_gpu_characteristics =
@@ -278,7 +284,6 @@ int gp10b_init_hal(struct gk20a *g)
278 gk20a_init_debug_ops(gops); 284 gk20a_init_debug_ops(gops);
279 gk20a_init_dbg_session_ops(gops); 285 gk20a_init_dbg_session_ops(gops);
280 gp10b_init_regops(gops); 286 gp10b_init_regops(gops);
281 gp10b_init_cde_ops(gops);
282 gp10b_init_therm_ops(gops); 287 gp10b_init_therm_ops(gops);
283 gk20a_init_tsg_ops(gops); 288 gk20a_init_tsg_ops(gops);
284 gk20a_init_pramin_ops(gops); 289 gk20a_init_pramin_ops(gops);