summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2017-04-11 08:18:00 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-12 18:34:20 -0400
commitf474a9e0e41d62f6a804c6501068da621556013e (patch)
treed440cd5a2be155a7013ddc8db47049fa772ec9b3 /drivers/gpu/nvgpu/gk20a/channel_gk20a.h
parentc3c3a3c5715d6aa38544922b76a636135429fd22 (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/channel_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
index 223aa641..0514c5b8 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
@@ -109,7 +109,14 @@ struct gk20a_event_id_data {
109 109
110 wait_queue_head_t event_id_wq; 110 wait_queue_head_t event_id_wq;
111 struct nvgpu_mutex lock; 111 struct nvgpu_mutex lock;
112 struct list_head event_id_node; 112 struct nvgpu_list_node event_id_node;
113};
114
115static inline struct gk20a_event_id_data *
116gk20a_event_id_data_from_event_id_node(struct nvgpu_list_node *node)
117{
118 return (struct gk20a_event_id_data *)
119 ((uintptr_t)node - offsetof(struct gk20a_event_id_data, event_id_node));
113}; 120};
114 121
115/* 122/*
@@ -226,7 +233,7 @@ struct channel_gk20a {
226 struct nvgpu_mutex dbg_s_lock; 233 struct nvgpu_mutex dbg_s_lock;
227 struct nvgpu_list_node dbg_s_list; 234 struct nvgpu_list_node dbg_s_list;
228 235
229 struct list_head event_id_list; 236 struct nvgpu_list_node event_id_list;
230 struct nvgpu_mutex event_id_list_lock; 237 struct nvgpu_mutex event_id_list_lock;
231 238
232 bool has_timedout; 239 bool has_timedout;