diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h index 0ff6cfb3..d569a6cd 100644 --- a/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/dbg_gpu_gk20a.h | |||
@@ -31,6 +31,9 @@ int gk20a_prof_gpu_dev_open(struct inode *inode, struct file *filp); | |||
31 | /* used by the interrupt handler to post events */ | 31 | /* used by the interrupt handler to post events */ |
32 | void gk20a_dbg_gpu_post_events(struct channel_gk20a *fault_ch); | 32 | void gk20a_dbg_gpu_post_events(struct channel_gk20a *fault_ch); |
33 | 33 | ||
34 | struct channel_gk20a * | ||
35 | nvgpu_dbg_gpu_get_session_channel(struct dbg_session_gk20a *dbg_s); | ||
36 | |||
34 | struct dbg_gpu_session_ops { | 37 | struct dbg_gpu_session_ops { |
35 | int (*exec_reg_ops)(struct dbg_session_gk20a *dbg_s, | 38 | int (*exec_reg_ops)(struct dbg_session_gk20a *dbg_s, |
36 | struct nvgpu_dbg_gpu_reg_op *ops, | 39 | struct nvgpu_dbg_gpu_reg_op *ops, |
@@ -68,22 +71,37 @@ struct dbg_session_gk20a { | |||
68 | struct device *dev; | 71 | struct device *dev; |
69 | struct gk20a *g; | 72 | struct gk20a *g; |
70 | 73 | ||
71 | /* bound channel, if any */ | 74 | /* list of bound channels, if any */ |
72 | struct file *ch_f; | 75 | struct list_head ch_list; |
73 | struct channel_gk20a *ch; | 76 | struct mutex ch_list_lock; |
74 | 77 | ||
75 | /* session operations */ | 78 | /* session operations */ |
76 | struct dbg_gpu_session_ops *ops; | 79 | struct dbg_gpu_session_ops *ops; |
77 | 80 | ||
78 | /* event support */ | 81 | /* event support */ |
79 | struct dbg_gpu_session_events dbg_events; | 82 | struct dbg_gpu_session_events dbg_events; |
80 | struct list_head dbg_s_list_node; | ||
81 | 83 | ||
82 | bool broadcast_stop_trigger; | 84 | bool broadcast_stop_trigger; |
83 | }; | 85 | }; |
84 | 86 | ||
87 | struct dbg_session_data { | ||
88 | struct dbg_session_gk20a *dbg_s; | ||
89 | struct list_head dbg_s_entry; | ||
90 | }; | ||
91 | |||
92 | struct dbg_session_channel_data { | ||
93 | struct file *ch_f; | ||
94 | int channel_fd; | ||
95 | int chid; | ||
96 | struct list_head ch_entry; | ||
97 | struct dbg_session_data *session_data; | ||
98 | }; | ||
99 | |||
85 | extern struct dbg_gpu_session_ops dbg_gpu_session_ops_gk20a; | 100 | extern struct dbg_gpu_session_ops dbg_gpu_session_ops_gk20a; |
86 | 101 | ||
102 | int dbg_unbind_single_channel_gk20a(struct dbg_session_gk20a *dbg_s, | ||
103 | struct dbg_session_channel_data *ch_data); | ||
104 | |||
87 | bool gk20a_dbg_gpu_broadcast_stop_trigger(struct channel_gk20a *ch); | 105 | bool gk20a_dbg_gpu_broadcast_stop_trigger(struct channel_gk20a *ch); |
88 | int gk20a_dbg_gpu_clear_broadcast_stop_trigger(struct channel_gk20a *ch); | 106 | int gk20a_dbg_gpu_clear_broadcast_stop_trigger(struct channel_gk20a *ch); |
89 | 107 | ||