summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/fifo_gp10b.c')
-rw-r--r--drivers/gpu/nvgpu/gp10b/fifo_gp10b.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c
index 4766e0e4..45de221e 100644
--- a/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c
@@ -23,6 +23,7 @@
23#include "hw_ccsr_gp10b.h" 23#include "hw_ccsr_gp10b.h"
24#include "hw_fifo_gp10b.h" 24#include "hw_fifo_gp10b.h"
25#include "hw_ram_gp10b.h" 25#include "hw_ram_gp10b.h"
26#include "hw_top_gp10b.h"
26 27
27static void gp10b_set_pdb_fault_replay_flags(struct gk20a *g, 28static void gp10b_set_pdb_fault_replay_flags(struct gk20a *g,
28 struct mem_desc *mem) 29 struct mem_desc *mem)
@@ -181,10 +182,26 @@ static int gp10b_fifo_resetup_ramfc(struct channel_gk20a *c)
181 return 0; 182 return 0;
182} 183}
183 184
185static int gp10b_fifo_engine_enum_from_type(struct gk20a *g, u32 engine_type)
186{
187 int ret = ENGINE_INVAL_GK20A;
188
189 gk20a_dbg_info("engine type %d", engine_type);
190 if (engine_type == top_device_info_type_enum_graphics_v())
191 ret = ENGINE_GR_GK20A;
192 else if (engine_type == top_device_info_type_enum_lce_v())
193 ret = ENGINE_CE2_GK20A;
194 else
195 gk20a_err(g->dev, "unknown engine %d", engine_type);
196
197 return ret;
198}
199
184void gp10b_init_fifo(struct gpu_ops *gops) 200void gp10b_init_fifo(struct gpu_ops *gops)
185{ 201{
186 gm20b_init_fifo(gops); 202 gm20b_init_fifo(gops);
187 gops->fifo.setup_ramfc = channel_gp10b_setup_ramfc; 203 gops->fifo.setup_ramfc = channel_gp10b_setup_ramfc;
188 gops->fifo.get_pbdma_signature = gp10b_fifo_get_pbdma_signature; 204 gops->fifo.get_pbdma_signature = gp10b_fifo_get_pbdma_signature;
189 gops->fifo.resetup_ramfc = gp10b_fifo_resetup_ramfc; 205 gops->fifo.resetup_ramfc = gp10b_fifo_resetup_ramfc;
206 gops->fifo.engine_enum_from_type = gp10b_fifo_engine_enum_from_type;
190} 207}