summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/fifo_gk20a.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
index dc1f48b7..00119300 100644
--- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
@@ -55,7 +55,9 @@
55#define FECS_METHOD_WFI_RESTORE 0x80000 55#define FECS_METHOD_WFI_RESTORE 0x80000
56#define FECS_MAILBOX_0_ACK_RESTORE 0x4 56#define FECS_MAILBOX_0_ACK_RESTORE 0x4
57 57
58 58static int gk20a_fifo_update_runlist_locked(struct gk20a *g, u32 runlist_id,
59 u32 chid, bool add,
60 bool wait_for_finish);
59static u32 gk20a_fifo_engines_on_id(struct gk20a *g, u32 id, bool is_tsg); 61static u32 gk20a_fifo_engines_on_id(struct gk20a *g, u32 id, bool is_tsg);
60 62
61static const char *const pbdma_intr_fault_type_desc[] = { 63static const char *const pbdma_intr_fault_type_desc[] = {
@@ -2702,7 +2704,7 @@ void gk20a_fifo_issue_preempt(struct gk20a *g, u32 id, bool is_tsg)
2702} 2704}
2703 2705
2704int gk20a_fifo_is_preempt_pending(struct gk20a *g, u32 id, 2706int gk20a_fifo_is_preempt_pending(struct gk20a *g, u32 id,
2705 unsigned int id_type) 2707 unsigned int id_type, unsigned int timeout_rc_type)
2706{ 2708{
2707 struct nvgpu_timeout timeout; 2709 struct nvgpu_timeout timeout;
2708 u32 delay = GR_IDLE_CHECK_DEFAULT; 2710 u32 delay = GR_IDLE_CHECK_DEFAULT;
@@ -2775,8 +2777,8 @@ int __locked_fifo_preempt(struct gk20a *g, u32 id, bool is_tsg)
2775 id_type = is_tsg ? ID_TYPE_TSG : ID_TYPE_CHANNEL; 2777 id_type = is_tsg ? ID_TYPE_TSG : ID_TYPE_CHANNEL;
2776 2778
2777 /* wait for preempt */ 2779 /* wait for preempt */
2778 ret = g->ops.fifo.is_preempt_pending(g, id, id_type); 2780 ret = g->ops.fifo.is_preempt_pending(g, id, id_type,
2779 2781 PREEMPT_TIMEOUT_RC);
2780 return ret; 2782 return ret;
2781} 2783}
2782 2784
@@ -3273,7 +3275,7 @@ void gk20a_fifo_runlist_hw_submit(struct gk20a *g, u32 runlist_id,
3273 fifo_eng_runlist_length_f(count)); 3275 fifo_eng_runlist_length_f(count));
3274} 3276}
3275 3277
3276int gk20a_fifo_update_runlist_locked(struct gk20a *g, u32 runlist_id, 3278static int gk20a_fifo_update_runlist_locked(struct gk20a *g, u32 runlist_id,
3277 u32 chid, bool add, 3279 u32 chid, bool add,
3278 bool wait_for_finish) 3280 bool wait_for_finish)
3279{ 3281{
@@ -3446,7 +3448,8 @@ static int __locked_fifo_reschedule_preempt_next(struct channel_gk20a *ch,
3446 gk20a_readl(g, fifo_preempt_r())); 3448 gk20a_readl(g, fifo_preempt_r()));
3447#endif 3449#endif
3448 if (wait_preempt) { 3450 if (wait_preempt) {
3449 g->ops.fifo.is_preempt_pending(g, preempt_id, preempt_type); 3451 g->ops.fifo.is_preempt_pending(
3452 g, preempt_id, preempt_type, PREEMPT_TIMEOUT_RC);
3450 } 3453 }
3451#ifdef TRACEPOINTS_ENABLED 3454#ifdef TRACEPOINTS_ENABLED
3452 trace_gk20a_reschedule_preempted_next(ch->chid); 3455 trace_gk20a_reschedule_preempted_next(ch->chid);