From 3c556c5e9573ffa69bfe64ed1401ed4a9141acb3 Mon Sep 17 00:00:00 2001 From: Sunny He Date: Tue, 27 Jun 2017 15:09:58 -0700 Subject: gpu: nvgpu: gv11b: Reorg ce2 HAL initialization Reorganize HAL initialization to remove inheritance and construct the gpu_ops struct at compile time. This patch only covers the ce2 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: Ia2d715a471d7e23420691a461e9442780176ea13 Signed-off-by: Sunny He Reviewed-on: https://git-master.nvidia.com/r/1509633 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gv11b/ce_gv11b.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'drivers/gpu/nvgpu/gv11b/ce_gv11b.c') diff --git a/drivers/gpu/nvgpu/gv11b/ce_gv11b.c b/drivers/gpu/nvgpu/gv11b/ce_gv11b.c index 9716c6d6..8bf636b1 100644 --- a/drivers/gpu/nvgpu/gv11b/ce_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/ce_gv11b.c @@ -28,7 +28,7 @@ #include #include -static u32 gv11b_ce_get_num_pce(struct gk20a *g) +u32 gv11b_ce_get_num_pce(struct gk20a *g) { /* register contains a bitmask indicating which physical copy * engines are present (and not floorswept). @@ -41,7 +41,7 @@ static u32 gv11b_ce_get_num_pce(struct gk20a *g) return num_pce; } -static void gv11b_ce_isr(struct gk20a *g, u32 inst_id, u32 pri_base) +void gv11b_ce_isr(struct gk20a *g, u32 inst_id, u32 pri_base) { u32 ce_intr = gk20a_readl(g, ce_intr_status_r(inst_id)); u32 clear_intr = 0; @@ -102,10 +102,3 @@ void gv11b_ce_mthd_buffer_fault_in_bar2_fault(struct gk20a *g) } } } - -void gv11b_init_ce(struct gpu_ops *gops) -{ - gp10b_init_ce(gops); - gops->ce2.isr_stall = gv11b_ce_isr; - gops->ce2.get_num_pce = gv11b_ce_get_num_pce; -} -- cgit v1.2.2