diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-04-11 08:18:00 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-12 18:34:20 -0400 |
commit | f474a9e0e41d62f6a804c6501068da621556013e (patch) | |
tree | d440cd5a2be155a7013ddc8db47049fa772ec9b3 /drivers/gpu/nvgpu/gk20a/tsg_gk20a.c | |
parent | c3c3a3c5715d6aa38544922b76a636135429fd22 (diff) |
gpu: nvgpu: use nvgpu list for event id list
Use nvgpu list APIs instead of linux list APIs
to store event IDs into channel and TSGs
Jira NVGPU-13
Change-Id: I51e4b6ab3b38c845a870901b4d498927ca404a78
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1460574
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/tsg_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/tsg_gk20a.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c index 5f07ade7..d1e667b6 100644 --- a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c | |||
@@ -145,7 +145,7 @@ int gk20a_init_tsg_support(struct gk20a *g, u32 tsgid) | |||
145 | nvgpu_init_list_node(&tsg->ch_list); | 145 | nvgpu_init_list_node(&tsg->ch_list); |
146 | init_rwsem(&tsg->ch_list_lock); | 146 | init_rwsem(&tsg->ch_list_lock); |
147 | 147 | ||
148 | INIT_LIST_HEAD(&tsg->event_id_list); | 148 | nvgpu_init_list_node(&tsg->event_id_list); |
149 | err = nvgpu_mutex_init(&tsg->event_id_list_lock); | 149 | err = nvgpu_mutex_init(&tsg->event_id_list_lock); |
150 | if (err) { | 150 | if (err) { |
151 | tsg->in_use = true; /* make this TSG unusable */ | 151 | tsg->in_use = true; /* make this TSG unusable */ |
@@ -297,10 +297,11 @@ void gk20a_tsg_release(struct kref *ref) | |||
297 | 297 | ||
298 | /* unhook all events created on this TSG */ | 298 | /* unhook all events created on this TSG */ |
299 | nvgpu_mutex_acquire(&tsg->event_id_list_lock); | 299 | nvgpu_mutex_acquire(&tsg->event_id_list_lock); |
300 | list_for_each_entry_safe(event_id_data, event_id_data_temp, | 300 | nvgpu_list_for_each_entry_safe(event_id_data, event_id_data_temp, |
301 | &tsg->event_id_list, | 301 | &tsg->event_id_list, |
302 | gk20a_event_id_data, | ||
302 | event_id_node) { | 303 | event_id_node) { |
303 | list_del_init(&event_id_data->event_id_node); | 304 | nvgpu_list_del(&event_id_data->event_id_node); |
304 | } | 305 | } |
305 | nvgpu_mutex_release(&tsg->event_id_list_lock); | 306 | nvgpu_mutex_release(&tsg->event_id_list_lock); |
306 | 307 | ||