summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
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/channel_gk20a.c
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/channel_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.c12
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];