summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.h12
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
85static inline struct mem_desc *
86mem_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
84struct mem_desc_sub { 92struct 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;