diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-03-31 07:07:30 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-03 11:55:20 -0400 |
commit | f0147665b2d9c3faa673e6b0001be596018c4e9c (patch) | |
tree | 0e15e3daafdc0ed2a8444ca36f448dce9c057186 /drivers/gpu/nvgpu/gk20a/ce2_gk20a.h | |
parent | 42852f182a783e7bcd157fa0a9390c77e9376a60 (diff) |
gpu: nvgpu: use nvgpu list for CE2 ctx list
Use nvgpu list APIs instead of linux list APIs
to store CE2 contexts
Jira NVGPU-13
Change-Id: I0c9b8b69e7e19a63265802abb4455a5cb2308b6f
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1454011
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/ce2_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/ce2_gk20a.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.h b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.h index 7ecf130f..7a4e4861 100644 --- a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.h | |||
@@ -91,7 +91,7 @@ struct gk20a_ce_app { | |||
91 | struct nvgpu_mutex app_mutex; | 91 | struct nvgpu_mutex app_mutex; |
92 | int app_state; | 92 | int app_state; |
93 | 93 | ||
94 | struct list_head allocated_contexts; | 94 | struct nvgpu_list_node allocated_contexts; |
95 | u32 ctx_count; | 95 | u32 ctx_count; |
96 | u32 next_ctx_id; | 96 | u32 next_ctx_id; |
97 | }; | 97 | }; |
@@ -112,7 +112,7 @@ struct gk20a_gpu_ctx { | |||
112 | /* cmd buf mem_desc */ | 112 | /* cmd buf mem_desc */ |
113 | struct mem_desc cmd_buf_mem; | 113 | struct mem_desc cmd_buf_mem; |
114 | 114 | ||
115 | struct list_head list; | 115 | struct nvgpu_list_node list; |
116 | 116 | ||
117 | u64 submitted_seq_number; | 117 | u64 submitted_seq_number; |
118 | u64 completed_seq_number; | 118 | u64 completed_seq_number; |
@@ -121,6 +121,13 @@ struct gk20a_gpu_ctx { | |||
121 | u32 cmd_buf_end_queue_offset; | 121 | u32 cmd_buf_end_queue_offset; |
122 | }; | 122 | }; |
123 | 123 | ||
124 | static inline struct gk20a_gpu_ctx * | ||
125 | gk20a_gpu_ctx_from_list(struct nvgpu_list_node *node) | ||
126 | { | ||
127 | return (struct gk20a_gpu_ctx *) | ||
128 | ((uintptr_t)node - offsetof(struct gk20a_gpu_ctx, list)); | ||
129 | }; | ||
130 | |||
124 | /* global CE app related apis */ | 131 | /* global CE app related apis */ |
125 | int gk20a_init_ce_support(struct gk20a *g); | 132 | int gk20a_init_ce_support(struct gk20a *g); |
126 | void gk20a_ce_suspend(struct gk20a *g); | 133 | void gk20a_ce_suspend(struct gk20a *g); |