summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-12-15 13:25:22 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-12-28 13:01:32 -0500
commitf19f22fcc8ef21b363b873c499cbd2e690af29f8 (patch)
tree02d6b8280af305d0339ed860e331ab091d4b49d2 /drivers/gpu/nvgpu/gk20a/channel_gk20a.c
parentaa52601f620423fdd98b79e2c2c5e1d767a5f685 (diff)
gpu: nvgpu: Remove support for channel events
Remove support for events for bare channels. All users have already moved to TSGs and TSG events. Bug 1842197 Change-Id: Ib3ff68134ad9515ee761d0f0e19a3150a0b744ab Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1618906 Reviewed-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
index e10be3c9..07ae5a16 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
@@ -689,7 +689,6 @@ struct channel_gk20a *gk20a_open_new_channel(struct gk20a *g,
689{ 689{
690 struct fifo_gk20a *f = &g->fifo; 690 struct fifo_gk20a *f = &g->fifo;
691 struct channel_gk20a *ch; 691 struct channel_gk20a *ch;
692 struct gk20a_event_id_data *event_id_data, *event_id_data_temp;
693 692
694 /* compatibility with existing code */ 693 /* compatibility with existing code */
695 if (!gk20a_fifo_is_valid_runlist_id(g, runlist_id)) { 694 if (!gk20a_fifo_is_valid_runlist_id(g, runlist_id)) {
@@ -730,16 +729,6 @@ struct channel_gk20a *gk20a_open_new_channel(struct gk20a *g,
730 ch->pid = current->pid; 729 ch->pid = current->pid;
731 ch->tgid = current->tgid; /* process granularity for FECS traces */ 730 ch->tgid = current->tgid; /* process granularity for FECS traces */
732 731
733 /* unhook all events created on this channel */
734 nvgpu_mutex_acquire(&ch->event_id_list_lock);
735 nvgpu_list_for_each_entry_safe(event_id_data, event_id_data_temp,
736 &ch->event_id_list,
737 gk20a_event_id_data,
738 event_id_node) {
739 nvgpu_list_del(&event_id_data->event_id_node);
740 }
741 nvgpu_mutex_release(&ch->event_id_list_lock);
742
743 /* By default, channel is regular (non-TSG) channel */ 732 /* By default, channel is regular (non-TSG) channel */
744 ch->tsgid = NVGPU_INVALID_TSG_ID; 733 ch->tsgid = NVGPU_INVALID_TSG_ID;
745 734
@@ -2134,7 +2123,6 @@ int gk20a_init_channel_support(struct gk20a *g, u32 chid)
2134 2123
2135 nvgpu_init_list_node(&c->joblist.dynamic.jobs); 2124 nvgpu_init_list_node(&c->joblist.dynamic.jobs);
2136 nvgpu_init_list_node(&c->dbg_s_list); 2125 nvgpu_init_list_node(&c->dbg_s_list);
2137 nvgpu_init_list_node(&c->event_id_list);
2138 nvgpu_init_list_node(&c->worker_item); 2126 nvgpu_init_list_node(&c->worker_item);
2139 2127
2140 err = nvgpu_mutex_init(&c->ioctl_lock); 2128 err = nvgpu_mutex_init(&c->ioctl_lock);
@@ -2157,19 +2145,14 @@ int gk20a_init_channel_support(struct gk20a *g, u32 chid)
2157 if (err) 2145 if (err)
2158 goto fail_5; 2146 goto fail_5;
2159#endif 2147#endif
2160 err = nvgpu_mutex_init(&c->event_id_list_lock);
2161 if (err)
2162 goto fail_6;
2163 err = nvgpu_mutex_init(&c->dbg_s_lock); 2148 err = nvgpu_mutex_init(&c->dbg_s_lock);
2164 if (err) 2149 if (err)
2165 goto fail_7; 2150 goto fail_6;
2166 2151
2167 nvgpu_list_add(&c->free_chs, &g->fifo.free_chs); 2152 nvgpu_list_add(&c->free_chs, &g->fifo.free_chs);
2168 2153
2169 return 0; 2154 return 0;
2170 2155
2171fail_7:
2172 nvgpu_mutex_destroy(&c->event_id_list_lock);
2173fail_6: 2156fail_6:
2174#if defined(CONFIG_GK20A_CYCLE_STATS) 2157#if defined(CONFIG_GK20A_CYCLE_STATS)
2175 nvgpu_mutex_destroy(&c->cs_client_mutex); 2158 nvgpu_mutex_destroy(&c->cs_client_mutex);
@@ -2286,9 +2269,6 @@ void gk20a_channel_semaphore_wakeup(struct gk20a *g, bool post_events)
2286 2269
2287 gk20a_tsg_event_id_post_event(tsg, 2270 gk20a_tsg_event_id_post_event(tsg,
2288 NVGPU_EVENT_ID_BLOCKING_SYNC); 2271 NVGPU_EVENT_ID_BLOCKING_SYNC);
2289 } else {
2290 gk20a_channel_event_id_post_event(c,
2291 NVGPU_EVENT_ID_BLOCKING_SYNC);
2292 } 2272 }
2293 } 2273 }
2294 /* 2274 /*