diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 25 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | 6 |
2 files changed, 13 insertions, 18 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 710313bf..382744c7 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -1943,7 +1943,8 @@ static u32 gk20a_fifo_engines_on_id(struct gk20a *g, u32 id, bool is_tsg) | |||
1943 | return engines; | 1943 | return engines; |
1944 | } | 1944 | } |
1945 | 1945 | ||
1946 | void gk20a_fifo_recover_ch(struct gk20a *g, u32 chid, bool verbose, int rc_type) | 1946 | void gk20a_fifo_recover_ch(struct gk20a *g, struct channel_gk20a *ch, |
1947 | bool verbose, u32 rc_type) | ||
1947 | { | 1948 | { |
1948 | u32 engines; | 1949 | u32 engines; |
1949 | 1950 | ||
@@ -1952,22 +1953,16 @@ void gk20a_fifo_recover_ch(struct gk20a *g, u32 chid, bool verbose, int rc_type) | |||
1952 | nvgpu_mutex_acquire(&g->dbg_sessions_lock); | 1953 | nvgpu_mutex_acquire(&g->dbg_sessions_lock); |
1953 | gr_gk20a_disable_ctxsw(g); | 1954 | gr_gk20a_disable_ctxsw(g); |
1954 | 1955 | ||
1955 | engines = gk20a_fifo_engines_on_id(g, chid, false); | 1956 | engines = gk20a_fifo_engines_on_id(g, ch->chid, false); |
1956 | 1957 | ||
1957 | if (engines) { | 1958 | if (engines) { |
1958 | gk20a_fifo_recover(g, engines, chid, false, true, verbose, | 1959 | gk20a_fifo_recover(g, engines, ch->chid, false, true, verbose, |
1959 | rc_type); | 1960 | rc_type); |
1960 | } else { | 1961 | } else { |
1961 | struct channel_gk20a *ch = gk20a_channel_from_id(g, chid); | 1962 | gk20a_channel_abort(ch, false); |
1962 | |||
1963 | if (ch != NULL) { | ||
1964 | gk20a_channel_abort(ch, false); | ||
1965 | |||
1966 | if (gk20a_fifo_error_ch(g, ch)) { | ||
1967 | gk20a_debug_dump(g); | ||
1968 | } | ||
1969 | 1963 | ||
1970 | gk20a_channel_put(ch); | 1964 | if (gk20a_fifo_error_ch(g, ch)) { |
1965 | gk20a_debug_dump(g); | ||
1971 | } | 1966 | } |
1972 | } | 1967 | } |
1973 | 1968 | ||
@@ -2148,7 +2143,7 @@ int gk20a_fifo_force_reset_ch(struct channel_gk20a *ch, | |||
2148 | RC_TYPE_FORCE_RESET); | 2143 | RC_TYPE_FORCE_RESET); |
2149 | } else { | 2144 | } else { |
2150 | g->ops.fifo.set_error_notifier(ch, err_code); | 2145 | g->ops.fifo.set_error_notifier(ch, err_code); |
2151 | gk20a_fifo_recover_ch(g, ch->chid, verbose, | 2146 | gk20a_fifo_recover_ch(g, ch, verbose, |
2152 | RC_TYPE_FORCE_RESET); | 2147 | RC_TYPE_FORCE_RESET); |
2153 | } | 2148 | } |
2154 | 2149 | ||
@@ -2711,7 +2706,7 @@ static void gk20a_fifo_pbdma_fault_rc(struct gk20a *g, | |||
2711 | 2706 | ||
2712 | if (ch != NULL) { | 2707 | if (ch != NULL) { |
2713 | g->ops.fifo.set_error_notifier(ch, error_notifier); | 2708 | g->ops.fifo.set_error_notifier(ch, error_notifier); |
2714 | gk20a_fifo_recover_ch(g, id, true, RC_TYPE_PBDMA_FAULT); | 2709 | gk20a_fifo_recover_ch(g, ch, true, RC_TYPE_PBDMA_FAULT); |
2715 | gk20a_channel_put(ch); | 2710 | gk20a_channel_put(ch); |
2716 | } | 2711 | } |
2717 | } else if (fifo_pbdma_status_id_type_v(status) | 2712 | } else if (fifo_pbdma_status_id_type_v(status) |
@@ -2926,7 +2921,7 @@ void gk20a_fifo_preempt_timeout_rc(struct gk20a *g, u32 chid) | |||
2926 | if (ch != NULL) { | 2921 | if (ch != NULL) { |
2927 | g->ops.fifo.set_error_notifier(ch, | 2922 | g->ops.fifo.set_error_notifier(ch, |
2928 | NVGPU_ERR_NOTIFIER_FIFO_ERROR_IDLE_TIMEOUT); | 2923 | NVGPU_ERR_NOTIFIER_FIFO_ERROR_IDLE_TIMEOUT); |
2929 | gk20a_fifo_recover_ch(g, chid, true, | 2924 | gk20a_fifo_recover_ch(g, ch, true, |
2930 | RC_TYPE_PREEMPT_TIMEOUT); | 2925 | RC_TYPE_PREEMPT_TIMEOUT); |
2931 | gk20a_channel_put(ch); | 2926 | gk20a_channel_put(ch); |
2932 | } | 2927 | } |
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h index 12970558..330929f6 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | |||
@@ -264,10 +264,10 @@ bool gk20a_fifo_mmu_fault_pending(struct gk20a *g); | |||
264 | void gk20a_fifo_recover(struct gk20a *g, | 264 | void gk20a_fifo_recover(struct gk20a *g, |
265 | u32 engine_ids, /* if zero, will be queried from HW */ | 265 | u32 engine_ids, /* if zero, will be queried from HW */ |
266 | u32 hw_id, /* if ~0, will be queried from HW */ | 266 | u32 hw_id, /* if ~0, will be queried from HW */ |
267 | bool hw_id_is_tsg, /* ignored if hw_id == ~0 */ | 267 | bool id_is_tsg, /* ignored if hw_id == ~0 */ |
268 | bool id_is_known, bool verbose, int rc_type); | 268 | bool id_is_known, bool verbose, int rc_type); |
269 | void gk20a_fifo_recover_ch(struct gk20a *g, u32 chid, bool verbose, | 269 | void gk20a_fifo_recover_ch(struct gk20a *g, struct channel_gk20a *ch, |
270 | int rc_type); | 270 | bool verbose, u32 rc_type); |
271 | void gk20a_fifo_recover_tsg(struct gk20a *g, struct tsg_gk20a *tsg, | 271 | void gk20a_fifo_recover_tsg(struct gk20a *g, struct tsg_gk20a *tsg, |
272 | bool verbose, u32 rc_type); | 272 | bool verbose, u32 rc_type); |
273 | int gk20a_fifo_force_reset_ch(struct channel_gk20a *ch, | 273 | int gk20a_fifo_force_reset_ch(struct channel_gk20a *ch, |