diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 3159f026..a5243834 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -329,11 +329,17 @@ static void channel_gk20a_bind(struct channel_gk20a *c) | |||
329 | { | 329 | { |
330 | struct gk20a *g = c->g; | 330 | struct gk20a *g = c->g; |
331 | struct fifo_gk20a *f = &g->fifo; | 331 | struct fifo_gk20a *f = &g->fifo; |
332 | struct fifo_engine_info_gk20a *engine_info = | 332 | u32 engine_id; |
333 | f->engine_info + ENGINE_GR_GK20A; | 333 | struct fifo_engine_info_gk20a *engine_info = NULL; |
334 | u32 inst_ptr = gk20a_mm_inst_block_addr(g, &c->inst_block) | 334 | u32 inst_ptr = gk20a_mm_inst_block_addr(g, &c->inst_block) |
335 | >> ram_in_base_shift_v(); | 335 | >> ram_in_base_shift_v(); |
336 | 336 | ||
337 | /* TODO:Need to handle non GR engine channel bind path */ | ||
338 | engine_id = gk20a_fifo_get_gr_engine_id(g); | ||
339 | |||
340 | /* Consider 1st available GR engine */ | ||
341 | engine_info = (f->engine_info + engine_id); | ||
342 | |||
337 | gk20a_dbg_info("bind channel %d inst ptr 0x%08x", | 343 | gk20a_dbg_info("bind channel %d inst ptr 0x%08x", |
338 | c->hw_chid, inst_ptr); | 344 | c->hw_chid, inst_ptr); |
339 | 345 | ||
@@ -1716,7 +1722,7 @@ static void gk20a_channel_timeout_handler(struct work_struct *work) | |||
1716 | /* Get failing engine data */ | 1722 | /* Get failing engine data */ |
1717 | engine_id = gk20a_fifo_get_failing_engine_data(g, &id, &is_tsg); | 1723 | engine_id = gk20a_fifo_get_failing_engine_data(g, &id, &is_tsg); |
1718 | 1724 | ||
1719 | if (engine_id >= g->fifo.max_engines) { | 1725 | if (!gk20a_fifo_is_valid_engine_id(g, engine_id)) { |
1720 | /* If no failing engine, abort the channels */ | 1726 | /* If no failing engine, abort the channels */ |
1721 | if (gk20a_is_channel_marked_as_tsg(ch)) { | 1727 | if (gk20a_is_channel_marked_as_tsg(ch)) { |
1722 | struct tsg_gk20a *tsg = &g->fifo.tsg[ch->tsgid]; | 1728 | struct tsg_gk20a *tsg = &g->fifo.tsg[ch->tsgid]; |