diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-04-11 08:32:12 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-12 18:34:31 -0400 |
commit | 50f5fd2cb02553291e52bb0e7f3c9e78a0b8eef1 (patch) | |
tree | dbcdcc34731dd8525b1bd462003f89c618458abf /drivers/gpu/nvgpu/gk20a/channel_gk20a.h | |
parent | a6adaaab7a90d86a71943f9977920ad7f726cea8 (diff) |
gpu: nvgpu: use nvgpu list for dynamic joblist
Use nvgpu list APIs instead of linux list APIs
for dynamic joblist
Jira NVGPU-13
Change-Id: I53779037589b1b6260d877d3bc9bd611ea9831ba
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1460576
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.h | 11 |
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 d52c1b6f..3312f8f1 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h | |||
@@ -65,7 +65,14 @@ struct channel_gk20a_job { | |||
65 | struct gk20a_fence *post_fence; | 65 | struct gk20a_fence *post_fence; |
66 | struct priv_cmd_entry *wait_cmd; | 66 | struct priv_cmd_entry *wait_cmd; |
67 | struct priv_cmd_entry *incr_cmd; | 67 | struct priv_cmd_entry *incr_cmd; |
68 | struct list_head list; | 68 | struct nvgpu_list_node list; |
69 | }; | ||
70 | |||
71 | static inline struct channel_gk20a_job * | ||
72 | channel_gk20a_job_from_list(struct nvgpu_list_node *node) | ||
73 | { | ||
74 | return (struct channel_gk20a_job *) | ||
75 | ((uintptr_t)node - offsetof(struct channel_gk20a_job, list)); | ||
69 | }; | 76 | }; |
70 | 77 | ||
71 | struct channel_gk20a_joblist { | 78 | struct channel_gk20a_joblist { |
@@ -79,7 +86,7 @@ struct channel_gk20a_joblist { | |||
79 | } pre_alloc; | 86 | } pre_alloc; |
80 | 87 | ||
81 | struct { | 88 | struct { |
82 | struct list_head jobs; | 89 | struct nvgpu_list_node jobs; |
83 | struct nvgpu_spinlock lock; | 90 | struct nvgpu_spinlock lock; |
84 | } dynamic; | 91 | } dynamic; |
85 | 92 | ||