From 4e290320fdfe56cc2fe849720d6a01b44cace1a7 Mon Sep 17 00:00:00 2001 From: Sunny He Date: Tue, 27 Jun 2017 14:05:15 -0700 Subject: gpu: nvgpu: gv11b: Reorg mc HAL initialization Reorganize HAL initialization to remove inheritance and construct the gpu_ops struct at compile time. This patch only covers the mc 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: I1a5abde46bf079c206dfdf9f8ee35df048565c49 Signed-off-by: Sunny He Reviewed-on: https://git-master.nvidia.com/r/1509603 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: Vijayakumar Subbu --- drivers/gpu/nvgpu/gv11b/mc_gv11b.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'drivers/gpu/nvgpu/gv11b/mc_gv11b.c') diff --git a/drivers/gpu/nvgpu/gv11b/mc_gv11b.c b/drivers/gpu/nvgpu/gv11b/mc_gv11b.c index cc29f74a..81e6381f 100644 --- a/drivers/gpu/nvgpu/gv11b/mc_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/mc_gv11b.c @@ -24,7 +24,7 @@ #include -static void mc_gv11b_intr_enable(struct gk20a *g) +void mc_gv11b_intr_enable(struct gk20a *g) { u32 eng_intr_mask = gk20a_fifo_engine_interrupt_mask(g); @@ -57,14 +57,7 @@ static void mc_gv11b_intr_enable(struct gk20a *g) } -static bool gv11b_mc_is_intr_hub_pending(struct gk20a *g, u32 mc_intr_0) +bool gv11b_mc_is_intr_hub_pending(struct gk20a *g, u32 mc_intr_0) { return ((mc_intr_0 & mc_intr_hub_pending_f()) ? true : false); } - -void gv11b_init_mc(struct gpu_ops *gops) -{ - gp10b_init_mc(gops); - gops->mc.intr_enable = mc_gv11b_intr_enable; - gops->mc.is_intr_hub_pending = gv11b_mc_is_intr_hub_pending; -} -- cgit v1.2.2