mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
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:
committed by
mobile promotions
parent
42852f182a
commit
f0147665b2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user