summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2017-04-11 08:24:27 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-12 18:34:25 -0400
commita6adaaab7a90d86a71943f9977920ad7f726cea8 (patch)
tree79dcfa4f268fb5b5784996aa3b91f86e8a6ef640 /drivers/gpu/nvgpu/gk20a/channel_gk20a.h
parentf474a9e0e41d62f6a804c6501068da621556013e (diff)
gpu: nvgpu: use nvgpu list for channel worker item
Use nvgpu list APIs instead of linux list APIs to store channel worker items Jira NVGPU-13 Change-Id: I01d214810ca2495bd0a644dd1a2816ab8e526981 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1460575 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.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
index 0514c5b8..d52c1b6f 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
@@ -217,7 +217,7 @@ struct channel_gk20a {
217 217
218 struct channel_gk20a_timeout timeout; 218 struct channel_gk20a_timeout timeout;
219 /* for job cleanup handling in the background worker */ 219 /* for job cleanup handling in the background worker */
220 struct list_head worker_item; 220 struct nvgpu_list_node worker_item;
221 221
222#if defined(CONFIG_GK20A_CYCLE_STATS) 222#if defined(CONFIG_GK20A_CYCLE_STATS)
223 struct { 223 struct {
@@ -284,6 +284,13 @@ channel_gk20a_from_ch_entry(struct nvgpu_list_node *node)
284 ((uintptr_t)node - offsetof(struct channel_gk20a, ch_entry)); 284 ((uintptr_t)node - offsetof(struct channel_gk20a, ch_entry));
285}; 285};
286 286
287static inline struct channel_gk20a *
288channel_gk20a_from_worker_item(struct nvgpu_list_node *node)
289{
290 return (struct channel_gk20a *)
291 ((uintptr_t)node - offsetof(struct channel_gk20a, worker_item));
292};
293
287static inline bool gk20a_channel_as_bound(struct channel_gk20a *ch) 294static inline bool gk20a_channel_as_bound(struct channel_gk20a *ch)
288{ 295{
289 return !!ch->vm; 296 return !!ch->vm;