summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp106
diff options
context:
space:
mode:
authorSunny He <suhe@nvidia.com>2017-06-28 20:41:55 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-07-24 02:35:04 -0400
commit2b582c5141752ff272c5d059b56433155bc3985a (patch)
tree1874c77484fb0bf0e927378940e1a6f140390182 /drivers/gpu/nvgpu/gp106
parent907fcae63816b68e43e07e3d7abaad87954b8326 (diff)
gpu: nvgpu: Reorg priv_ring HAL initialization
Reorganize HAL initialization to remove inheritance and construct the gpu_ops struct at compile time. This patch only covers the priv_ring 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: I9ebf27619f771262e5dc398b1200d6c19d6aef16 Signed-off-by: Sunny He <suhe@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1514102 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/gp106')
-rw-r--r--drivers/gpu/nvgpu/gp106/hal_gp106.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c
index dde0468a..1690c42b 100644
--- a/drivers/gpu/nvgpu/gp106/hal_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c
@@ -314,6 +314,9 @@ static const struct gpu_ops gp106_ops = {
314 .falcon = { 314 .falcon = {
315 .falcon_hal_sw_init = gp106_falcon_hal_sw_init, 315 .falcon_hal_sw_init = gp106_falcon_hal_sw_init,
316 }, 316 },
317 .priv_ring = {
318 .isr = gp10b_priv_ring_isr,
319 },
317 .get_litter_value = gp106_get_litter_value, 320 .get_litter_value = gp106_get_litter_value,
318 .chip_init_gpu_characteristics = gp106_init_gpu_characteristics, 321 .chip_init_gpu_characteristics = gp106_init_gpu_characteristics,
319 .bios_init = gm206_bios_init, 322 .bios_init = gm206_bios_init,
@@ -338,6 +341,7 @@ int gp106_init_hal(struct gk20a *g)
338#endif 341#endif
339 gops->xve = gp106_ops.xve; 342 gops->xve = gp106_ops.xve;
340 gops->falcon = gp106_ops.falcon; 343 gops->falcon = gp106_ops.falcon;
344 gops->priv_ring = gp106_ops.priv_ring;
341 345
342 /* Lone functions */ 346 /* Lone functions */
343 gops->get_litter_value = gp106_ops.get_litter_value; 347 gops->get_litter_value = gp106_ops.get_litter_value;
@@ -349,8 +353,8 @@ int gp106_init_hal(struct gk20a *g)
349 gops->securegpccs = 1; 353 gops->securegpccs = 1;
350 gops->pmupstate = true; 354 gops->pmupstate = true;
351 355
356
352 g->bootstrap_owner = LSF_FALCON_ID_SEC2; 357 g->bootstrap_owner = LSF_FALCON_ID_SEC2;
353 gp10b_init_priv_ring(gops);
354 gp106_init_gr(gops); 358 gp106_init_gr(gops);
355 gp10b_init_fecs_trace_ops(gops); 359 gp10b_init_fecs_trace_ops(gops);
356 gp106_init_fb(gops); 360 gp106_init_fb(gops);