summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b')
-rw-r--r--drivers/gpu/nvgpu/gv11b/fifo_gv11b.c11
-rw-r--r--drivers/gpu/nvgpu/gv11b/fifo_gv11b.h2
2 files changed, 4 insertions, 9 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c
index fb9c7712..8b5eef82 100644
--- a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c
@@ -801,22 +801,17 @@ int gv11b_fifo_is_preempt_pending(struct gk20a *g, u32 id,
801 return ret; 801 return ret;
802} 802}
803 803
804int gv11b_fifo_preempt_channel(struct gk20a *g, u32 chid) 804int gv11b_fifo_preempt_channel(struct gk20a *g, struct channel_gk20a *ch)
805{ 805{
806 struct fifo_gk20a *f = &g->fifo;
807 struct tsg_gk20a *tsg = NULL; 806 struct tsg_gk20a *tsg = NULL;
808 807
809 if (chid == FIFO_INVAL_CHANNEL_ID) { 808 tsg = tsg_gk20a_from_ch(ch);
810 return 0;
811 }
812
813 tsg = tsg_gk20a_from_ch(&f->channel[chid]);
814 809
815 if (tsg == NULL) { 810 if (tsg == NULL) {
816 return 0; 811 return 0;
817 } 812 }
818 813
819 nvgpu_log_info(g, "chid:%d tsgid:%d", chid, tsg->tsgid); 814 nvgpu_log_info(g, "chid:%d tsgid:%d", ch->chid, tsg->tsgid);
820 815
821 /* Preempt tsg. Channel preempt is NOOP */ 816 /* Preempt tsg. Channel preempt is NOOP */
822 return g->ops.fifo.preempt_tsg(g, tsg); 817 return g->ops.fifo.preempt_tsg(g, tsg);
diff --git a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.h b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.h
index 7ff42637..3d491bad 100644
--- a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.h
+++ b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.h
@@ -81,7 +81,7 @@ u32 gv11b_fifo_intr_0_error_mask(struct gk20a *g);
81int gv11b_fifo_reschedule_runlist(struct channel_gk20a *ch, bool preempt_next); 81int gv11b_fifo_reschedule_runlist(struct channel_gk20a *ch, bool preempt_next);
82int gv11b_fifo_is_preempt_pending(struct gk20a *g, u32 id, 82int gv11b_fifo_is_preempt_pending(struct gk20a *g, u32 id,
83 unsigned int id_type); 83 unsigned int id_type);
84int gv11b_fifo_preempt_channel(struct gk20a *g, u32 chid); 84int gv11b_fifo_preempt_channel(struct gk20a *g, struct channel_gk20a *ch);
85int gv11b_fifo_preempt_tsg(struct gk20a *g, struct tsg_gk20a *tsg); 85int gv11b_fifo_preempt_tsg(struct gk20a *g, struct tsg_gk20a *tsg);
86int gv11b_fifo_enable_tsg(struct tsg_gk20a *tsg); 86int gv11b_fifo_enable_tsg(struct tsg_gk20a *tsg);
87void gv11b_fifo_teardown_ch_tsg(struct gk20a *g, u32 act_eng_bitmask, 87void gv11b_fifo_teardown_ch_tsg(struct gk20a *g, u32 act_eng_bitmask,