From 2b582c5141752ff272c5d059b56433155bc3985a Mon Sep 17 00:00:00 2001 From: Sunny He Date: Wed, 28 Jun 2017 17:41:55 -0700 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1514102 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: Vijayakumar Subbu --- drivers/gpu/nvgpu/gp106/hal_gp106.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gp106') 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 = { .falcon = { .falcon_hal_sw_init = gp106_falcon_hal_sw_init, }, + .priv_ring = { + .isr = gp10b_priv_ring_isr, + }, .get_litter_value = gp106_get_litter_value, .chip_init_gpu_characteristics = gp106_init_gpu_characteristics, .bios_init = gm206_bios_init, @@ -338,6 +341,7 @@ int gp106_init_hal(struct gk20a *g) #endif gops->xve = gp106_ops.xve; gops->falcon = gp106_ops.falcon; + gops->priv_ring = gp106_ops.priv_ring; /* Lone functions */ gops->get_litter_value = gp106_ops.get_litter_value; @@ -349,8 +353,8 @@ int gp106_init_hal(struct gk20a *g) gops->securegpccs = 1; gops->pmupstate = true; + g->bootstrap_owner = LSF_FALCON_ID_SEC2; - gp10b_init_priv_ring(gops); gp106_init_gr(gops); gp10b_init_fecs_trace_ops(gops); gp106_init_fb(gops); -- cgit v1.2.2