diff options
author | Sunny He <suhe@nvidia.com> | 2017-06-29 14:16:36 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-07-13 03:09:09 -0400 |
commit | 542ad000f2fb0301fbfb7e6defc6a01eb488906d (patch) | |
tree | 13ee76cd70b5ed771b04e699b3842bb5451bca1a /drivers/gpu/nvgpu/gp10b | |
parent | 47cb48f1e2d9c34f22f9fcf443ef67a32cd54a73 (diff) |
gpu: nvgpu: 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: Id51feeccbea91f884a6057efc680566a7d5d0b6d
Signed-off-by: Sunny He <suhe@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1514822
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/gp10b')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/hal_gp10b.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c index af1195ea..627280ae 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include "gk20a/bus_gk20a.h" | 19 | #include "gk20a/bus_gk20a.h" |
20 | #include "gk20a/pramin_gk20a.h" | 20 | #include "gk20a/pramin_gk20a.h" |
21 | #include "gk20a/flcn_gk20a.h" | 21 | #include "gk20a/flcn_gk20a.h" |
22 | #include "gk20a/regops_gk20a.h" | ||
22 | #include "gk20a/mc_gk20a.h" | 23 | #include "gk20a/mc_gk20a.h" |
23 | 24 | ||
24 | #include "gp10b/gr_gp10b.h" | 25 | #include "gp10b/gr_gp10b.h" |
@@ -224,6 +225,21 @@ static const struct gpu_ops gp10b_ops = { | |||
224 | .boot_0 = gk20a_mc_boot_0, | 225 | .boot_0 = gk20a_mc_boot_0, |
225 | .is_intr1_pending = mc_gp10b_is_intr1_pending, | 226 | .is_intr1_pending = mc_gp10b_is_intr1_pending, |
226 | }, | 227 | }, |
228 | .debug = { | ||
229 | .show_dump = gk20a_debug_show_dump, | ||
230 | }, | ||
231 | .dbg_session_ops = { | ||
232 | .exec_reg_ops = exec_regops_gk20a, | ||
233 | .dbg_set_powergate = dbg_set_powergate, | ||
234 | .check_and_set_global_reservation = | ||
235 | nvgpu_check_and_set_global_reservation, | ||
236 | .check_and_set_context_reservation = | ||
237 | nvgpu_check_and_set_context_reservation, | ||
238 | .release_profiler_reservation = | ||
239 | nvgpu_release_profiler_reservation, | ||
240 | .perfbuffer_enable = gk20a_perfbuf_enable_locked, | ||
241 | .perfbuffer_disable = gk20a_perfbuf_disable_locked, | ||
242 | }, | ||
227 | .cde = { | 243 | .cde = { |
228 | .get_program_numbers = gp10b_cde_get_program_numbers, | 244 | .get_program_numbers = gp10b_cde_get_program_numbers, |
229 | .need_scatter_buffer = gp10b_need_scatter_buffer, | 245 | .need_scatter_buffer = gp10b_need_scatter_buffer, |
@@ -245,6 +261,8 @@ int gp10b_init_hal(struct gk20a *g) | |||
245 | gops->ltc = gp10b_ops.ltc; | 261 | gops->ltc = gp10b_ops.ltc; |
246 | gops->clock_gating = gp10b_ops.clock_gating; | 262 | gops->clock_gating = gp10b_ops.clock_gating; |
247 | gops->mc = gp10b_ops.mc; | 263 | gops->mc = gp10b_ops.mc; |
264 | gops->debug = gp10b_ops.debug; | ||
265 | gops->dbg_session_ops = gp10b_ops.dbg_session_ops; | ||
248 | gops->cde = gp10b_ops.cde; | 266 | gops->cde = gp10b_ops.cde; |
249 | gops->falcon = gp10b_ops.falcon; | 267 | gops->falcon = gp10b_ops.falcon; |
250 | 268 | ||
@@ -301,8 +319,6 @@ int gp10b_init_hal(struct gk20a *g) | |||
301 | gp10b_init_gr_ctx(gops); | 319 | gp10b_init_gr_ctx(gops); |
302 | gp10b_init_mm(gops); | 320 | gp10b_init_mm(gops); |
303 | gp10b_init_pmu_ops(gops); | 321 | gp10b_init_pmu_ops(gops); |
304 | gk20a_init_debug_ops(gops); | ||
305 | gk20a_init_dbg_session_ops(gops); | ||
306 | gp10b_init_regops(gops); | 322 | gp10b_init_regops(gops); |
307 | gp10b_init_therm_ops(gops); | 323 | gp10b_init_therm_ops(gops); |
308 | gk20a_init_tsg_ops(gops); | 324 | gk20a_init_tsg_ops(gops); |