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 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 | ||
287 | static inline struct channel_gk20a * | ||
288 | channel_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 | |||
287 | static inline bool gk20a_channel_as_bound(struct channel_gk20a *ch) | 294 | static inline bool gk20a_channel_as_bound(struct channel_gk20a *ch) |
288 | { | 295 | { |
289 | return !!ch->vm; | 296 | return !!ch->vm; |