diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2016-03-29 05:31:25 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-04-19 11:07:34 -0400 |
commit | dfac8ce70464413c0e3748634c57d49950e71933 (patch) | |
tree | 35d17f9d35aadf134bbff98ee41e8d7664f442da /drivers/gpu/nvgpu/gk20a/gk20a.h | |
parent | c651adbeaacf063b856ef8126b74661b54066477 (diff) |
gpu: nvgpu: support binding multiple channels to a debug session
We currently bind only one channel to a debug session
But some use cases might need multiple channels bound
to same debug session
Add this support by adding a list of channels to debug session.
List structure is implemented as struct dbg_session_channel_data
List node dbg_s_list_node is currently defined in struct
dbg_session_gk20a. But this is inefficient when we need to
add debug session to multiple channels
Hence add new reference structure dbg_session_data to
store dbg_session pointer and list entry
For each NVGPU_DBG_GPU_IOCTL_BIND_CHANNEL call, create
two reference structure dbg_session_channel_data for channel
and dbg_session_data for debug session and bind them together
Define API nvgpu_dbg_gpu_get_session_channel() which will
get first channel in the list of debug session
Use this API wherever we refer to channel bound to debug
session
Remove dbg_sessions define in struct gk20a since it is
not being used anywhere
Add new API NVGPU_DBG_GPU_IOCTL_UNBIND_CHANNEL to support
unbinding of channel from debug sesssion
Bug 200156699
Change-Id: I3bfa6f9cd5b90e7254a75c7e64ac893739776b7f
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1120331
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index d1ce6afb..b03e779b 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -647,7 +647,6 @@ struct gk20a { | |||
647 | /* held while manipulating # of debug/profiler sessions present */ | 647 | /* held while manipulating # of debug/profiler sessions present */ |
648 | /* also prevents debug sessions from attaching until released */ | 648 | /* also prevents debug sessions from attaching until released */ |
649 | struct mutex dbg_sessions_lock; | 649 | struct mutex dbg_sessions_lock; |
650 | int dbg_sessions; /* number attached */ | ||
651 | int dbg_powergating_disabled_refcount; /*refcount for pg disable */ | 650 | int dbg_powergating_disabled_refcount; /*refcount for pg disable */ |
652 | int dbg_timeout_disabled_refcount; /*refcount for timeout disable */ | 651 | int dbg_timeout_disabled_refcount; /*refcount for timeout disable */ |
653 | 652 | ||