diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-03-31 08:57:00 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-03 11:55:20 -0400 |
commit | 6c58737bed4477f3e3199956b29b3948a465c14d (patch) | |
tree | c8d2fa0af638c5082d7765ab1ce091c95d6e527d /drivers/gpu/nvgpu/gk20a/channel_gk20a.h | |
parent | cd3cf04cac5f740135becb0fc70a16cfb8c2aaba (diff) |
gpu: nvgpu: use nvgpu list to store ch in TSG
Use nvgpu list APIs instead of linux list APIs
to store channel entries in TSG
Jira NVGPU-13
Change-Id: I2f64fffc5c43487e1c9e6ccef59c60f079c09da4
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1454014
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.h | 9 |
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 fd36ff1f..37b1d945 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h | |||
@@ -190,7 +190,7 @@ struct channel_gk20a { | |||
190 | struct nvgpu_mutex ioctl_lock; | 190 | struct nvgpu_mutex ioctl_lock; |
191 | 191 | ||
192 | int tsgid; | 192 | int tsgid; |
193 | struct list_head ch_entry; /* channel's entry in TSG */ | 193 | struct nvgpu_list_node ch_entry; /* channel's entry in TSG */ |
194 | 194 | ||
195 | struct channel_gk20a_joblist joblist; | 195 | struct channel_gk20a_joblist joblist; |
196 | struct nvgpu_allocator fence_allocator; | 196 | struct nvgpu_allocator fence_allocator; |
@@ -278,6 +278,13 @@ channel_gk20a_from_free_chs(struct nvgpu_list_node *node) | |||
278 | ((uintptr_t)node - offsetof(struct channel_gk20a, free_chs)); | 278 | ((uintptr_t)node - offsetof(struct channel_gk20a, free_chs)); |
279 | }; | 279 | }; |
280 | 280 | ||
281 | static inline struct channel_gk20a * | ||
282 | channel_gk20a_from_ch_entry(struct nvgpu_list_node *node) | ||
283 | { | ||
284 | return (struct channel_gk20a *) | ||
285 | ((uintptr_t)node - offsetof(struct channel_gk20a, ch_entry)); | ||
286 | }; | ||
287 | |||
281 | static inline bool gk20a_channel_as_bound(struct channel_gk20a *ch) | 288 | static inline bool gk20a_channel_as_bound(struct channel_gk20a *ch) |
282 | { | 289 | { |
283 | return !!ch->vm; | 290 | return !!ch->vm; |