summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b
diff options
context:
space:
mode:
authorSunny He <suhe@nvidia.com>2017-06-29 14:16:36 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-07-13 03:09:09 -0400
commit542ad000f2fb0301fbfb7e6defc6a01eb488906d (patch)
tree13ee76cd70b5ed771b04e699b3842bb5451bca1a /drivers/gpu/nvgpu/gm20b
parent47cb48f1e2d9c34f22f9fcf443ef67a32cd54a73 (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/gm20b')
-rw-r--r--drivers/gpu/nvgpu/gm20b/hal_gm20b.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c
index 4baed828..e2f80307 100644
--- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c
@@ -20,6 +20,7 @@
20#include "gk20a/bus_gk20a.h" 20#include "gk20a/bus_gk20a.h"
21#include "gk20a/flcn_gk20a.h" 21#include "gk20a/flcn_gk20a.h"
22#include "gk20a/priv_ring_gk20a.h" 22#include "gk20a/priv_ring_gk20a.h"
23#include "gk20a/regops_gk20a.h"
23 24
24#include "ltc_gm20b.h" 25#include "ltc_gm20b.h"
25#include "ce2_gm20b.h" 26#include "ce2_gm20b.h"
@@ -215,6 +216,21 @@ static const struct gpu_ops gm20b_ops = {
215 .boot_0 = gk20a_mc_boot_0, 216 .boot_0 = gk20a_mc_boot_0,
216 .is_intr1_pending = mc_gk20a_is_intr1_pending, 217 .is_intr1_pending = mc_gk20a_is_intr1_pending,
217 }, 218 },
219 .debug = {
220 .show_dump = gk20a_debug_show_dump,
221 },
222 .dbg_session_ops = {
223 .exec_reg_ops = exec_regops_gk20a,
224 .dbg_set_powergate = dbg_set_powergate,
225 .check_and_set_global_reservation =
226 nvgpu_check_and_set_global_reservation,
227 .check_and_set_context_reservation =
228 nvgpu_check_and_set_context_reservation,
229 .release_profiler_reservation =
230 nvgpu_release_profiler_reservation,
231 .perfbuffer_enable = gk20a_perfbuf_enable_locked,
232 .perfbuffer_disable = gk20a_perfbuf_disable_locked,
233 },
218 .cde = { 234 .cde = {
219 .get_program_numbers = gm20b_cde_get_program_numbers, 235 .get_program_numbers = gm20b_cde_get_program_numbers,
220 }, 236 },
@@ -234,6 +250,8 @@ int gm20b_init_hal(struct gk20a *g)
234 gops->ltc = gm20b_ops.ltc; 250 gops->ltc = gm20b_ops.ltc;
235 gops->clock_gating = gm20b_ops.clock_gating; 251 gops->clock_gating = gm20b_ops.clock_gating;
236 gops->mc = gm20b_ops.mc; 252 gops->mc = gm20b_ops.mc;
253 gops->dbg_session_ops = gm20b_ops.dbg_session_ops;
254 gops->debug = gm20b_ops.debug;
237 gops->cde = gm20b_ops.cde; 255 gops->cde = gm20b_ops.cde;
238 gops->falcon = gm20b_ops.falcon; 256 gops->falcon = gm20b_ops.falcon;
239 257
@@ -282,8 +300,6 @@ int gm20b_init_hal(struct gk20a *g)
282 gm20b_init_pmu_ops(gops); 300 gm20b_init_pmu_ops(gops);
283 gm20b_init_clk_ops(gops); 301 gm20b_init_clk_ops(gops);
284 gm20b_init_regops(gops); 302 gm20b_init_regops(gops);
285 gk20a_init_debug_ops(gops);
286 gk20a_init_dbg_session_ops(gops);
287 gm20b_init_therm_ops(gops); 303 gm20b_init_therm_ops(gops);
288 gk20a_init_tsg_ops(gops); 304 gk20a_init_tsg_ops(gops);
289#if defined(CONFIG_GK20A_CYCLE_STATS) 305#if defined(CONFIG_GK20A_CYCLE_STATS)