From 622072d1c069581da80b14a7ea64e20d283877ab Mon Sep 17 00:00:00 2001 From: Seema Khowala Date: Mon, 11 Sep 2017 10:33:51 -0700 Subject: gpu: nvgpu: gv11b: poll tsgid for preempt done Use tsgid for polling preemption completion since id and next_id in pbdma and eng status point to tsgid Bug 200277163 Bug 1958308 Change-Id: I5636ce1f8b21ddac4c93d92ce0527fe0307f2cfc Signed-off-by: Seema Khowala Reviewed-on: https://git-master.nvidia.com/r/1557253 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gv11b/fifo_gv11b.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'drivers/gpu/nvgpu/gv11b/fifo_gv11b.c') diff --git a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c index 6f9e44fb..dce8ce9b 100644 --- a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c @@ -710,20 +710,24 @@ int gv11b_fifo_is_preempt_pending(struct gk20a *g, u32 id, u32 runlist_id; int func_ret; int ret = 0; + u32 tsgid; - gk20a_dbg_fn(""); - - if (id_type == ID_TYPE_TSG) + if (id_type == ID_TYPE_TSG) { runlist_id = f->tsg[id].runlist_id; - else + tsgid = id; + } else { runlist_id = f->channel[id].runlist_id; + tsgid = f->channel[id].tsgid; + } + + nvgpu_log_info(g, "Check preempt pending for tsgid = %u", tsgid); runlist_served_pbdmas = f->runlist_info[runlist_id].pbdma_bitmask; runlist_served_engines = f->runlist_info[runlist_id].eng_bitmask; for_each_set_bit(pbdma_id, &runlist_served_pbdmas, f->num_pbdma) { - func_ret = gv11b_fifo_poll_pbdma_chan_status(g, id, pbdma_id, + func_ret = gv11b_fifo_poll_pbdma_chan_status(g, tsgid, pbdma_id, timeout_rc_type); if (func_ret != 0) { gk20a_dbg_info("preempt timeout pbdma %d", pbdma_id); @@ -735,7 +739,7 @@ int gv11b_fifo_is_preempt_pending(struct gk20a *g, u32 id, for_each_set_bit(act_eng_id, &runlist_served_engines, f->num_engines) { - func_ret = gv11b_fifo_poll_eng_ctx_status(g, id, act_eng_id, + func_ret = gv11b_fifo_poll_eng_ctx_status(g, tsgid, act_eng_id, &f->runlist_info[runlist_id].reset_eng_bitmask, timeout_rc_type); -- cgit v1.2.2