summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b/mc_gv11b.c
diff options
context:
space:
mode:
authorSunny He <suhe@nvidia.com>2017-06-27 17:05:15 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-07-13 03:09:09 -0400
commit4e290320fdfe56cc2fe849720d6a01b44cace1a7 (patch)
treeba6665b465ba33533f99e141c8e65209bebe42d8 /drivers/gpu/nvgpu/gv11b/mc_gv11b.c
parentaade61eff9962b4671802b0d88523e6ccccde6b0 (diff)
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 <suhe@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1509603 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/gv11b/mc_gv11b.c')
-rw-r--r--drivers/gpu/nvgpu/gv11b/mc_gv11b.c11
1 files changed, 2 insertions, 9 deletions
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 @@
24 24
25#include <nvgpu/hw/gv11b/hw_mc_gv11b.h> 25#include <nvgpu/hw/gv11b/hw_mc_gv11b.h>
26 26
27static void mc_gv11b_intr_enable(struct gk20a *g) 27void mc_gv11b_intr_enable(struct gk20a *g)
28{ 28{
29 u32 eng_intr_mask = gk20a_fifo_engine_interrupt_mask(g); 29 u32 eng_intr_mask = gk20a_fifo_engine_interrupt_mask(g);
30 30
@@ -57,14 +57,7 @@ static void mc_gv11b_intr_enable(struct gk20a *g)
57 57
58} 58}
59 59
60static bool gv11b_mc_is_intr_hub_pending(struct gk20a *g, u32 mc_intr_0) 60bool gv11b_mc_is_intr_hub_pending(struct gk20a *g, u32 mc_intr_0)
61{ 61{
62 return ((mc_intr_0 & mc_intr_hub_pending_f()) ? true : false); 62 return ((mc_intr_0 & mc_intr_hub_pending_f()) ? true : false);
63} 63}
64
65void gv11b_init_mc(struct gpu_ops *gops)
66{
67 gp10b_init_mc(gops);
68 gops->mc.intr_enable = mc_gv11b_intr_enable;
69 gops->mc.is_intr_hub_pending = gv11b_mc_is_intr_hub_pending;
70}