summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
diff options
context:
space:
mode:
authorLakshmanan M <lm@nvidia.com>2016-06-02 00:04:46 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-06-07 15:31:34 -0400
commit6299b00beb9dabdd53c211b02658d022827b3232 (patch)
tree941d8dd8aae8f7f8c73329e182984c36a5a9bf88 /drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
parent3d7263d3cafdcfc57a6d6b9f829562845d116294 (diff)
gpu: nvgpu: Add multiple engine and runlist support
This CL covers the following modification, 1) Added multiple engine_info support 2) Added multiple runlist_info support 3) Initial changes for ASYNC CE support 4) Added ASYNC CE interrupt handling support for gm206 GPU family 5) Added generic mechanism to identify the CE engine pri_base address for gm206 (CE0, CE1 and CE2) 6) Removed hard coded engine_id logic and made generic way 7) Code cleanup for readability JIRA DNVGPU-26 Change-Id: I2c3846c40bcc8d10c2dfb225caa4105fc9123b65 Signed-off-by: Lakshmanan M <lm@nvidia.com> Reviewed-on: http://git-master/r/1155963 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/fifo_gk20a.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
index 5fb5f550..25d2cd9f 100644
--- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h
@@ -26,6 +26,8 @@
26 26
27#define MAX_RUNLIST_BUFFERS 2 27#define MAX_RUNLIST_BUFFERS 2
28 28
29#define FIFO_INVAL_ENGINE_ID ~0
30
29/* generally corresponds to the "pbdma" engine */ 31/* generally corresponds to the "pbdma" engine */
30 32
31struct fifo_runlist_info_gk20a { 33struct fifo_runlist_info_gk20a {
@@ -40,10 +42,10 @@ struct fifo_runlist_info_gk20a {
40 struct mutex mutex; /* protect channel preempt and runlist upate */ 42 struct mutex mutex; /* protect channel preempt and runlist upate */
41}; 43};
42 44
43/* so far gk20a has two engines: gr and ce2(gr_copy) */
44enum { 45enum {
45 ENGINE_GR_GK20A = 0, 46 ENGINE_GR_GK20A = 0,
46 ENGINE_CE2_GK20A = 1, 47 ENGINE_GRCE_GK20A = 1,
48 ENGINE_ASYNC_CE_GK20A = 2,
47 ENGINE_INVAL_GK20A 49 ENGINE_INVAL_GK20A
48}; 50};
49 51
@@ -85,6 +87,7 @@ struct fifo_engine_info_gk20a {
85 u32 inst_id; 87 u32 inst_id;
86 u32 pri_base; 88 u32 pri_base;
87 u32 fault_id; 89 u32 fault_id;
90 u32 engine_enum;
88 struct fifo_pbdma_exception_info_gk20a pbdma_exception_info; 91 struct fifo_pbdma_exception_info_gk20a pbdma_exception_info;
89 struct fifo_engine_exception_info_gk20a engine_exception_info; 92 struct fifo_engine_exception_info_gk20a engine_exception_info;
90 struct fifo_mmu_fault_info_gk20a mmu_fault_info; 93 struct fifo_mmu_fault_info_gk20a mmu_fault_info;
@@ -102,6 +105,7 @@ struct fifo_gk20a {
102 struct fifo_engine_info_gk20a *engine_info; 105 struct fifo_engine_info_gk20a *engine_info;
103 u32 max_engines; 106 u32 max_engines;
104 u32 num_engines; 107 u32 num_engines;
108 u32 *active_engines_list;
105 109
106 struct fifo_runlist_info_gk20a *runlist_info; 110 struct fifo_runlist_info_gk20a *runlist_info;
107 u32 max_runlists; 111 u32 max_runlists;
@@ -228,4 +232,15 @@ const char *gk20a_fifo_interleave_level_name(u32 interleave_level);
228int gk20a_fifo_engine_enum_from_type(struct gk20a *g, u32 engine_type, 232int gk20a_fifo_engine_enum_from_type(struct gk20a *g, u32 engine_type,
229 u32 *inst_id); 233 u32 *inst_id);
230 234
235u32 gk20a_fifo_get_engine_ids(struct gk20a *g, u32 engine_id[], u32 engine_id_sz, u32 engine_enum);
236
237void gk20a_fifo_delete_runlist(struct fifo_gk20a *f);
238
239struct fifo_engine_info_gk20a *gk20a_fifo_get_engine_info(struct gk20a *g, u32 engine_id);
240
241bool gk20a_fifo_is_valid_engine_id(struct gk20a *g, u32 engine_id);
242
243u32 gk20a_fifo_get_gr_engine_id(struct gk20a *g);
244
245u32 gk20a_fifo_get_all_ce_engine_reset_mask(struct gk20a *g);
231#endif /*__GR_GK20A_H__*/ 246#endif /*__GR_GK20A_H__*/