summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c
diff options
context:
space:
mode:
authorSeema Khowala <seemaj@nvidia.com>2017-09-11 13:33:51 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-09-15 18:13:24 -0400
commit622072d1c069581da80b14a7ea64e20d283877ab (patch)
tree50ea701f4d2865d1ef1720105816863ec89c4a50 /drivers/gpu/nvgpu/gv11b/fifo_gv11b.c
parent31a50f07e4458b43f46a9612e4b27893a50d53b3 (diff)
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 <seemaj@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1557253 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/fifo_gv11b.c')
-rw-r--r--drivers/gpu/nvgpu/gv11b/fifo_gv11b.c16
1 files changed, 10 insertions, 6 deletions
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,
710 u32 runlist_id; 710 u32 runlist_id;
711 int func_ret; 711 int func_ret;
712 int ret = 0; 712 int ret = 0;
713 u32 tsgid;
713 714
714 gk20a_dbg_fn(""); 715 if (id_type == ID_TYPE_TSG) {
715
716 if (id_type == ID_TYPE_TSG)
717 runlist_id = f->tsg[id].runlist_id; 716 runlist_id = f->tsg[id].runlist_id;
718 else 717 tsgid = id;
718 } else {
719 runlist_id = f->channel[id].runlist_id; 719 runlist_id = f->channel[id].runlist_id;
720 tsgid = f->channel[id].tsgid;
721 }
722
723 nvgpu_log_info(g, "Check preempt pending for tsgid = %u", tsgid);
720 724
721 runlist_served_pbdmas = f->runlist_info[runlist_id].pbdma_bitmask; 725 runlist_served_pbdmas = f->runlist_info[runlist_id].pbdma_bitmask;
722 runlist_served_engines = f->runlist_info[runlist_id].eng_bitmask; 726 runlist_served_engines = f->runlist_info[runlist_id].eng_bitmask;
723 727
724 for_each_set_bit(pbdma_id, &runlist_served_pbdmas, f->num_pbdma) { 728 for_each_set_bit(pbdma_id, &runlist_served_pbdmas, f->num_pbdma) {
725 729
726 func_ret = gv11b_fifo_poll_pbdma_chan_status(g, id, pbdma_id, 730 func_ret = gv11b_fifo_poll_pbdma_chan_status(g, tsgid, pbdma_id,
727 timeout_rc_type); 731 timeout_rc_type);
728 if (func_ret != 0) { 732 if (func_ret != 0) {
729 gk20a_dbg_info("preempt timeout pbdma %d", pbdma_id); 733 gk20a_dbg_info("preempt timeout pbdma %d", pbdma_id);
@@ -735,7 +739,7 @@ int gv11b_fifo_is_preempt_pending(struct gk20a *g, u32 id,
735 739
736 for_each_set_bit(act_eng_id, &runlist_served_engines, f->num_engines) { 740 for_each_set_bit(act_eng_id, &runlist_served_engines, f->num_engines) {
737 741
738 func_ret = gv11b_fifo_poll_eng_ctx_status(g, id, act_eng_id, 742 func_ret = gv11b_fifo_poll_eng_ctx_status(g, tsgid, act_eng_id,
739 &f->runlist_info[runlist_id].reset_eng_bitmask, 743 &f->runlist_info[runlist_id].reset_eng_bitmask,
740 timeout_rc_type); 744 timeout_rc_type);
741 745