From d9f906c1e0f06f54e545727817d227a0bac46a0a Mon Sep 17 00:00:00 2001 From: Sunny He Date: Wed, 28 Jun 2017 17:42:59 -0700 Subject: gpu: nvgpu: gv11b: Reorg priv_ring HAL init 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: Idee9e8a3a5bfa65b350f0e9fb14c4364c4d6f1d2 Signed-off-by: Sunny He Reviewed-on: https://git-master.nvidia.com/r/1514103 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: Vijayakumar Subbu --- drivers/gpu/nvgpu/gv11b/hal_gv11b.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c index 51fe6b0a..8dc9900a 100644 --- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c @@ -253,6 +253,9 @@ static const struct gpu_ops gv11b_ops = { .falcon = { .falcon_hal_sw_init = gk20a_falcon_hal_sw_init, }, + .priv_ring = { + .isr = gp10b_priv_ring_isr, + }, .chip_init_gpu_characteristics = gv11b_init_gpu_characteristics, .get_litter_value = gv11b_get_litter_value, }; @@ -272,6 +275,7 @@ int gv11b_init_hal(struct gk20a *g) gops->css = gv11b_ops.css; #endif gops->falcon = gv11b_ops.falcon; + gops->priv_ring = gv11b_ops.priv_ring; /* Lone functions */ gops->chip_init_gpu_characteristics = @@ -282,7 +286,6 @@ int gv11b_init_hal(struct gk20a *g) gops->privsecurity = 0; gops->securegpccs = 0; - gp10b_init_priv_ring(gops); gv11b_init_gr(gops); gv11b_init_fecs_trace_ops(gops); gv11b_init_fb(gops); -- cgit v1.2.2