summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b
diff options
context:
space:
mode:
authorSunny He <suhe@nvidia.com>2017-06-28 20:56:44 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-07-13 03:09:07 -0400
commitecf67ebbf69a9ab6481b1517b8920f7ac5828bb5 (patch)
tree87f9577885854817d46b0e7103933012040eb359 /drivers/gpu/nvgpu/gm20b
parent90d388ebf8d2f9f9d08f6a5c0f638aa8339c1f24 (diff)
gpu: nvgpu: Reorg falcon HAL initialization
Reorganize HAL initialization to remove inheritance and construct the gpu_ops struct at compile time. This patch only covers the falcon 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: Ib1aaaa248b079bb591ccfada3382b689452de0e9 Signed-off-by: Sunny He <suhe@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1514012 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b')
-rw-r--r--drivers/gpu/nvgpu/gm20b/hal_gm20b.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c
index b16289f9..c6c7b590 100644
--- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c
@@ -200,7 +200,10 @@ static const struct gpu_ops gm20b_ops = {
200 gr_gm20b_pg_gr_load_gating_prod, 200 gr_gm20b_pg_gr_load_gating_prod,
201 }, 201 },
202 .cde = { 202 .cde = {
203 .get_program_numbers = gm20b_cde_get_program_numbers 203 .get_program_numbers = gm20b_cde_get_program_numbers,
204 },
205 .falcon = {
206 .falcon_hal_sw_init = gk20a_falcon_hal_sw_init,
204 }, 207 },
205 .chip_init_gpu_characteristics = gk20a_init_gpu_characteristics, 208 .chip_init_gpu_characteristics = gk20a_init_gpu_characteristics,
206 .get_litter_value = gm20b_get_litter_value, 209 .get_litter_value = gm20b_get_litter_value,
@@ -215,6 +218,7 @@ int gm20b_init_hal(struct gk20a *g)
215 gops->ltc = gm20b_ops.ltc; 218 gops->ltc = gm20b_ops.ltc;
216 gops->clock_gating = gm20b_ops.clock_gating; 219 gops->clock_gating = gm20b_ops.clock_gating;
217 gops->cde = gm20b_ops.cde; 220 gops->cde = gm20b_ops.cde;
221 gops->falcon = gm20b_ops.falcon;
218 222
219 /* Lone functions */ 223 /* Lone functions */
220 gops->chip_init_gpu_characteristics = 224 gops->chip_init_gpu_characteristics =
@@ -259,7 +263,6 @@ int gm20b_init_hal(struct gk20a *g)
259 gm20b_init_ce2(gops); 263 gm20b_init_ce2(gops);
260 gm20b_init_gr_ctx(gops); 264 gm20b_init_gr_ctx(gops);
261 gm20b_init_mm(gops); 265 gm20b_init_mm(gops);
262 gk20a_falcon_init_hal(gops);
263 gm20b_init_pmu_ops(gops); 266 gm20b_init_pmu_ops(gops);
264 gm20b_init_clk_ops(gops); 267 gm20b_init_clk_ops(gops);
265 gm20b_init_regops(gops); 268 gm20b_init_regops(gops);