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>
This commit is contained in:
Deepak Nibade
2017-03-31 16:37:30 +05:30
committed by mobile promotions
parent 42852f182a
commit f0147665b2
2 changed files with 22 additions and 15 deletions

View File

@@ -91,7 +91,7 @@ struct gk20a_ce_app {
struct nvgpu_mutex app_mutex;
int app_state;
struct list_head allocated_contexts;
struct nvgpu_list_node allocated_contexts;
u32 ctx_count;
u32 next_ctx_id;
};
@@ -112,7 +112,7 @@ struct gk20a_gpu_ctx {
/* cmd buf mem_desc */
struct mem_desc cmd_buf_mem;
struct list_head list;
struct nvgpu_list_node list;
u64 submitted_seq_number;
u64 completed_seq_number;
@@ -121,6 +121,13 @@ struct gk20a_gpu_ctx {
u32 cmd_buf_end_queue_offset;
};
static inline struct gk20a_gpu_ctx *
gk20a_gpu_ctx_from_list(struct nvgpu_list_node *node)
{
return (struct gk20a_gpu_ctx *)
((uintptr_t)node - offsetof(struct gk20a_gpu_ctx, list));
};
/* global CE app related apis */
int gk20a_init_ce_support(struct gk20a *g);
void gk20a_ce_suspend(struct gk20a *g);