diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-03-31 08:21:55 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-03 11:55:20 -0400 |
commit | 371b173c12df8828df74da2c8edfc94182dccfae (patch) | |
tree | 491fc909e722109f10019d350f7101804f868e6c /drivers/gpu/nvgpu/gk20a/mm_gk20a.h | |
parent | f0147665b2d9c3faa673e6b0001be596018c4e9c (diff) |
gpu: nvgpu: use nvgpu list for vidmem clear list
Use nvgpu list APIs instead of linux list APIs
for vidmem clear list
Jira NVGPU-13
Change-Id: I13f7c5a54fb199d15ad1402216f3275f0f0474af
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1454012
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/mm_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h index 2c8eb16d..db99535a 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <asm/cacheflush.h> | 27 | #include <asm/cacheflush.h> |
28 | 28 | ||
29 | #include <nvgpu/allocator.h> | 29 | #include <nvgpu/allocator.h> |
30 | #include <nvgpu/list.h> | ||
30 | 31 | ||
31 | #ifdef CONFIG_ARM64 | 32 | #ifdef CONFIG_ARM64 |
32 | #define outer_flush_range(a, b) | 33 | #define outer_flush_range(a, b) |
@@ -76,11 +77,18 @@ struct mem_desc { | |||
76 | bool fixed; /* vidmem only */ | 77 | bool fixed; /* vidmem only */ |
77 | bool user_mem; /* vidmem only */ | 78 | bool user_mem; /* vidmem only */ |
78 | struct nvgpu_allocator *allocator; /* vidmem only */ | 79 | struct nvgpu_allocator *allocator; /* vidmem only */ |
79 | struct list_head clear_list_entry; /* vidmem only */ | 80 | struct nvgpu_list_node clear_list_entry; /* vidmem only */ |
80 | bool skip_wmb; | 81 | bool skip_wmb; |
81 | unsigned long flags; | 82 | unsigned long flags; |
82 | }; | 83 | }; |
83 | 84 | ||
85 | static inline struct mem_desc * | ||
86 | mem_desc_from_clear_list_entry(struct nvgpu_list_node *node) | ||
87 | { | ||
88 | return (struct mem_desc *) | ||
89 | ((uintptr_t)node - offsetof(struct mem_desc, clear_list_entry)); | ||
90 | }; | ||
91 | |||
84 | struct mem_desc_sub { | 92 | struct mem_desc_sub { |
85 | u32 offset; | 93 | u32 offset; |
86 | u32 size; | 94 | u32 size; |
@@ -416,7 +424,7 @@ struct mm_gk20a { | |||
416 | volatile bool cleared; | 424 | volatile bool cleared; |
417 | struct nvgpu_mutex first_clear_mutex; | 425 | struct nvgpu_mutex first_clear_mutex; |
418 | 426 | ||
419 | struct list_head clear_list_head; | 427 | struct nvgpu_list_node clear_list_head; |
420 | struct nvgpu_mutex clear_list_mutex; | 428 | struct nvgpu_mutex clear_list_mutex; |
421 | 429 | ||
422 | struct work_struct clear_mem_worker; | 430 | struct work_struct clear_mem_worker; |