diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 15 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | 10 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 6 |
3 files changed, 17 insertions, 14 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 | 58 | static int gk20a_fifo_update_runlist_locked(struct gk20a *g, u32 runlist_id, | |
59 | u32 chid, bool add, | ||
60 | bool wait_for_finish); | ||
59 | static u32 gk20a_fifo_engines_on_id(struct gk20a *g, u32 id, bool is_tsg); | 61 | static u32 gk20a_fifo_engines_on_id(struct gk20a *g, u32 id, bool is_tsg); |
60 | 62 | ||
61 | static const char *const pbdma_intr_fault_type_desc[] = { | 63 | static 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 | ||
2704 | int gk20a_fifo_is_preempt_pending(struct gk20a *g, u32 id, | 2706 | int 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 | ||
3276 | int gk20a_fifo_update_runlist_locked(struct gk20a *g, u32 runlist_id, | 3278 | static 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); |
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h index 77030c94..bccd15f6 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | |||
@@ -50,6 +50,9 @@ enum { | |||
50 | #define ID_TYPE_TSG 1 | 50 | #define ID_TYPE_TSG 1 |
51 | #define ID_TYPE_UNKNOWN ((u32)~0) | 51 | #define ID_TYPE_UNKNOWN ((u32)~0) |
52 | 52 | ||
53 | #define PREEMPT_TIMEOUT_RC 1 | ||
54 | #define PREEMPT_TIMEOUT_NORC 0 | ||
55 | |||
53 | #define RC_YES 1 | 56 | #define RC_YES 1 |
54 | #define RC_NO 0 | 57 | #define RC_NO 0 |
55 | 58 | ||
@@ -254,9 +257,6 @@ int nvgpu_fifo_reschedule_runlist(struct channel_gk20a *ch, bool preempt_next, | |||
254 | int gk20a_fifo_update_runlist(struct gk20a *g, u32 engine_id, u32 chid, | 257 | int gk20a_fifo_update_runlist(struct gk20a *g, u32 engine_id, u32 chid, |
255 | bool add, bool wait_for_finish); | 258 | bool add, bool wait_for_finish); |
256 | 259 | ||
257 | int gk20a_fifo_update_runlist_locked(struct gk20a *g, u32 runlist_id, | ||
258 | u32 chid, bool add, | ||
259 | bool wait_for_finish); | ||
260 | int gk20a_fifo_suspend(struct gk20a *g); | 260 | int gk20a_fifo_suspend(struct gk20a *g); |
261 | 261 | ||
262 | bool gk20a_fifo_mmu_fault_pending(struct gk20a *g); | 262 | bool gk20a_fifo_mmu_fault_pending(struct gk20a *g); |
@@ -390,8 +390,8 @@ void gk20a_fifo_channel_unbind(struct channel_gk20a *ch_gk20a); | |||
390 | 390 | ||
391 | u32 gk20a_fifo_intr_0_error_mask(struct gk20a *g); | 391 | u32 gk20a_fifo_intr_0_error_mask(struct gk20a *g); |
392 | 392 | ||
393 | int gk20a_fifo_is_preempt_pending(struct gk20a *g, u32 id, | 393 | int gk20a_fifo_is_preempt_pending(struct gk20a *g, u32 id, unsigned int id_type, |
394 | unsigned int id_type); | 394 | unsigned int timeout_rc_type); |
395 | int __locked_fifo_preempt(struct gk20a *g, u32 id, bool is_tsg); | 395 | int __locked_fifo_preempt(struct gk20a *g, u32 id, bool is_tsg); |
396 | void gk20a_fifo_preempt_timeout_rc(struct gk20a *g, u32 id, | 396 | void gk20a_fifo_preempt_timeout_rc(struct gk20a *g, u32 id, |
397 | unsigned int id_type); | 397 | unsigned int id_type); |
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index fac02f68..9061236e 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -662,9 +662,9 @@ struct gpu_ops { | |||
662 | struct ch_state *ch_state); | 662 | struct ch_state *ch_state); |
663 | u32 (*intr_0_error_mask)(struct gk20a *g); | 663 | u32 (*intr_0_error_mask)(struct gk20a *g); |
664 | int (*is_preempt_pending)(struct gk20a *g, u32 id, | 664 | int (*is_preempt_pending)(struct gk20a *g, u32 id, |
665 | unsigned int id_type); | 665 | unsigned int id_type, unsigned int timeout_rc_type); |
666 | int (*preempt_ch_tsg)(struct gk20a *g, u32 id, | 666 | int (*preempt_ch_tsg)(struct gk20a *g, u32 id, |
667 | unsigned int id_type); | 667 | unsigned int id_type, unsigned int timeout_rc_type); |
668 | void (*init_pbdma_intr_descs)(struct fifo_gk20a *f); | 668 | void (*init_pbdma_intr_descs)(struct fifo_gk20a *f); |
669 | int (*reset_enable_hw)(struct gk20a *g); | 669 | int (*reset_enable_hw)(struct gk20a *g); |
670 | int (*setup_userd)(struct channel_gk20a *c); | 670 | int (*setup_userd)(struct channel_gk20a *c); |
@@ -1109,7 +1109,7 @@ struct gpu_ops { | |||
1109 | bool (*is_intr_hub_pending)(struct gk20a *g, u32 mc_intr); | 1109 | bool (*is_intr_hub_pending)(struct gk20a *g, u32 mc_intr); |
1110 | bool (*is_intr_nvlink_pending)(struct gk20a *g, u32 mc_intr); | 1110 | bool (*is_intr_nvlink_pending)(struct gk20a *g, u32 mc_intr); |
1111 | bool (*is_stall_and_eng_intr_pending)(struct gk20a *g, | 1111 | bool (*is_stall_and_eng_intr_pending)(struct gk20a *g, |
1112 | u32 act_eng_id, u32 *eng_intr_pending); | 1112 | u32 act_eng_id); |
1113 | u32 (*intr_stall)(struct gk20a *g); | 1113 | u32 (*intr_stall)(struct gk20a *g); |
1114 | void (*intr_stall_pause)(struct gk20a *g); | 1114 | void (*intr_stall_pause)(struct gk20a *g); |
1115 | void (*intr_stall_resume)(struct gk20a *g); | 1115 | void (*intr_stall_resume)(struct gk20a *g); |