diff options
author | Sunny He <suhe@nvidia.com> | 2017-06-29 14:14:52 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-07-13 03:09:09 -0400 |
commit | 4074484f756734d9f1902944dc80966f3659bb39 (patch) | |
tree | 0ac9b05d6756c76c38b27647b12f3bd2028f770a /drivers | |
parent | 2f0838af1b8a73dc976837dfa568281d47628a37 (diff) |
gpu: nvgpu: gv11b: Reorg debug HAL initialization
Reorganize HAL initialization to remove inheritance and construct
the gpu_ops struct at compile time. This patch covers the debug
and dbg_session_ops sub-modules 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: I23cda2fbb47fb41975a4a938e352a7427853be94
Signed-off-by: Sunny He <suhe@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1514820
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')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/hal_gv11b.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c index d7f00d2f..18cd686e 100644 --- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include "gk20a/dbg_gpu_gk20a.h" | 25 | #include "gk20a/dbg_gpu_gk20a.h" |
26 | #include "gk20a/bus_gk20a.h" | 26 | #include "gk20a/bus_gk20a.h" |
27 | #include "gk20a/flcn_gk20a.h" | 27 | #include "gk20a/flcn_gk20a.h" |
28 | #include "gk20a/regops_gk20a.h" | ||
28 | 29 | ||
29 | #include "gm20b/ltc_gm20b.h" | 30 | #include "gm20b/ltc_gm20b.h" |
30 | #include "gm20b/gr_gm20b.h" | 31 | #include "gm20b/gr_gm20b.h" |
@@ -219,6 +220,21 @@ static const struct gpu_ops gv11b_ops = { | |||
219 | .is_intr1_pending = mc_gp10b_is_intr1_pending, | 220 | .is_intr1_pending = mc_gp10b_is_intr1_pending, |
220 | .is_intr_hub_pending = gv11b_mc_is_intr_hub_pending, | 221 | .is_intr_hub_pending = gv11b_mc_is_intr_hub_pending, |
221 | }, | 222 | }, |
223 | .debug = { | ||
224 | .show_dump = gk20a_debug_show_dump, | ||
225 | }, | ||
226 | .dbg_session_ops = { | ||
227 | .exec_reg_ops = exec_regops_gk20a, | ||
228 | .dbg_set_powergate = dbg_set_powergate, | ||
229 | .check_and_set_global_reservation = | ||
230 | nvgpu_check_and_set_global_reservation, | ||
231 | .check_and_set_context_reservation = | ||
232 | nvgpu_check_and_set_context_reservation, | ||
233 | .release_profiler_reservation = | ||
234 | nvgpu_release_profiler_reservation, | ||
235 | .perfbuffer_enable = gk20a_perfbuf_enable_locked, | ||
236 | .perfbuffer_disable = gk20a_perfbuf_disable_locked, | ||
237 | }, | ||
222 | .falcon = { | 238 | .falcon = { |
223 | .falcon_hal_sw_init = gk20a_falcon_hal_sw_init, | 239 | .falcon_hal_sw_init = gk20a_falcon_hal_sw_init, |
224 | }, | 240 | }, |
@@ -234,6 +250,8 @@ int gv11b_init_hal(struct gk20a *g) | |||
234 | gops->ltc = gv11b_ops.ltc; | 250 | gops->ltc = gv11b_ops.ltc; |
235 | gops->clock_gating = gv11b_ops.clock_gating; | 251 | gops->clock_gating = gv11b_ops.clock_gating; |
236 | gops->mc = gv11b_ops.mc; | 252 | gops->mc = gv11b_ops.mc; |
253 | gops->debug = gv11b_ops.debug; | ||
254 | gops->dbg_session_ops = gv11b_ops.dbg_session_ops; | ||
237 | gops->falcon = gv11b_ops.falcon; | 255 | gops->falcon = gv11b_ops.falcon; |
238 | 256 | ||
239 | /* Lone functions */ | 257 | /* Lone functions */ |
@@ -255,8 +273,6 @@ int gv11b_init_hal(struct gk20a *g) | |||
255 | gv11b_init_gr_ctx(gops); | 273 | gv11b_init_gr_ctx(gops); |
256 | gv11b_init_mm(gops); | 274 | gv11b_init_mm(gops); |
257 | gv11b_init_pmu_ops(gops); | 275 | gv11b_init_pmu_ops(gops); |
258 | gk20a_init_debug_ops(gops); | ||
259 | gk20a_init_dbg_session_ops(gops); | ||
260 | gv11b_init_regops(gops); | 276 | gv11b_init_regops(gops); |
261 | gv11b_init_therm_ops(gops); | 277 | gv11b_init_therm_ops(gops); |
262 | gk20a_init_tsg_ops(gops); | 278 | gk20a_init_tsg_ops(gops); |