diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2015-02-26 17:37:43 -0500 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-04-04 21:59:26 -0400 |
commit | 7290a6cbd5d03145d6f1ca4c3eacba40f6d4f93c (patch) | |
tree | de452c09f5eef76af273041dc64997fdc351dbd6 /drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | |
parent | bb51cf9ec6482b50f3020179965ef82f58d91a0a (diff) |
gpu: nvgpu: Implement common allocator and mem_desc
Introduce mem_desc, which holds all information needed for a buffer.
Implement helper functions for allocation and freeing that use this
data type.
Change-Id: I82c88595d058d4fb8c5c5fbf19d13269e48e422f
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/712699
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h index 4ff1398a..dd320ae1 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | |||
@@ -32,7 +32,7 @@ struct fifo_runlist_info_gk20a { | |||
32 | unsigned long *active_channels; | 32 | unsigned long *active_channels; |
33 | unsigned long *active_tsgs; | 33 | unsigned long *active_tsgs; |
34 | /* Each engine has its own SW and HW runlist buffer.*/ | 34 | /* Each engine has its own SW and HW runlist buffer.*/ |
35 | struct runlist_mem_desc mem[MAX_RUNLIST_BUFFERS]; | 35 | struct mem_desc mem[MAX_RUNLIST_BUFFERS]; |
36 | u32 cur_buffer; | 36 | u32 cur_buffer; |
37 | u32 total_entries; | 37 | u32 total_entries; |
38 | bool stopped; | 38 | bool stopped; |
@@ -102,9 +102,8 @@ struct fifo_gk20a { | |||
102 | struct fifo_runlist_info_gk20a *runlist_info; | 102 | struct fifo_runlist_info_gk20a *runlist_info; |
103 | u32 max_runlists; | 103 | u32 max_runlists; |
104 | 104 | ||
105 | struct userd_desc userd; | 105 | struct mem_desc userd; |
106 | u32 userd_entry_size; | 106 | u32 userd_entry_size; |
107 | u32 userd_total_size; | ||
108 | 107 | ||
109 | struct channel_gk20a *channel; | 108 | struct channel_gk20a *channel; |
110 | struct mutex ch_inuse_mutex; /* protect unused chid look up */ | 109 | struct mutex ch_inuse_mutex; /* protect unused chid look up */ |