From 542ad000f2fb0301fbfb7e6defc6a01eb488906d Mon Sep 17 00:00:00 2001 From: Sunny He Date: Thu, 29 Jun 2017 11:16:36 -0700 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1514822 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: Vijayakumar Subbu --- drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h') diff --git a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h index e48d8050..827fb42f 100644 --- a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h @@ -127,6 +127,17 @@ int dbg_unbind_single_channel_gk20a(struct dbg_session_gk20a *dbg_s, bool gk20a_dbg_gpu_broadcast_stop_trigger(struct channel_gk20a *ch); int gk20a_dbg_gpu_clear_broadcast_stop_trigger(struct channel_gk20a *ch); -void gk20a_init_dbg_session_ops(struct gpu_ops *gops); + +int dbg_set_powergate(struct dbg_session_gk20a *dbg_s, u32 powermode); +bool nvgpu_check_and_set_global_reservation( + struct dbg_session_gk20a *dbg_s, + struct dbg_profiler_object_data *prof_obj); +bool nvgpu_check_and_set_context_reservation( + struct dbg_session_gk20a *dbg_s, + struct dbg_profiler_object_data *prof_obj); +void nvgpu_release_profiler_reservation(struct dbg_session_gk20a *dbg_s, + struct dbg_profiler_object_data *prof_obj); +int gk20a_perfbuf_enable_locked(struct gk20a *g, u64 offset, u32 size); +int gk20a_perfbuf_disable_locked(struct gk20a *g); #endif /* DBG_GPU_GK20A_H */ -- cgit v1.2.2