diff options
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; |