summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
diff options
context:
space:
mode:
authorThomas Fleury <tfleury@nvidia.com>2016-08-17 20:26:30 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-08-29 19:14:29 -0400
commit5286fd525731d19dfa07d5e6e49e8d0eef233531 (patch)
tree6c64a7976d8e8795fb6bfda75cdfc7b058a4ecf8 /drivers/gpu/nvgpu/gk20a/channel_gk20a.c
parent06780e0681b34ec570346fe5d4bdaf7a23f08a36 (diff)
gpu: nvgpu: fix ctxsw timeout handling for TSGs
While collecting failing engine data, id type (is_tsg) was not set for ctxsw and save engine states. This could result in some ctxsw timeout interrupts to be ignored (id reported with wrong is_tsg). For TSGs, check if we made some progress on any of the channels before kicking fifo recovery. Bug 200228310 Jira EVLR-597 Change-Id: I231549ae68317919532de0f87effb78ee9c119c6 Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: http://git-master/r/1204035 (cherry picked from commit 7221d256fd7e9b418f7789b3d81eede8faa16f0b) Reviewed-on: http://git-master/r/1204037 Reviewed-by: Richard Zhao <rizhao@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
index 41fced99..d4cf6915 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
@@ -1539,16 +1539,19 @@ static inline u32 gp_free_count(struct channel_gk20a *c)
1539} 1539}
1540 1540
1541bool gk20a_channel_update_and_check_timeout(struct channel_gk20a *ch, 1541bool gk20a_channel_update_and_check_timeout(struct channel_gk20a *ch,
1542 u32 timeout_delta_ms) 1542 u32 timeout_delta_ms, bool *progress)
1543{ 1543{
1544 u32 gpfifo_get = update_gp_get(ch->g, ch); 1544 u32 gpfifo_get = update_gp_get(ch->g, ch);
1545
1545 /* Count consequent timeout isr */ 1546 /* Count consequent timeout isr */
1546 if (gpfifo_get == ch->timeout_gpfifo_get) { 1547 if (gpfifo_get == ch->timeout_gpfifo_get) {
1547 /* we didn't advance since previous channel timeout check */ 1548 /* we didn't advance since previous channel timeout check */
1548 ch->timeout_accumulated_ms += timeout_delta_ms; 1549 ch->timeout_accumulated_ms += timeout_delta_ms;
1550 *progress = false;
1549 } else { 1551 } else {
1550 /* first timeout isr encountered */ 1552 /* first timeout isr encountered */
1551 ch->timeout_accumulated_ms = timeout_delta_ms; 1553 ch->timeout_accumulated_ms = timeout_delta_ms;
1554 *progress = true;
1552 } 1555 }
1553 1556
1554 ch->timeout_gpfifo_get = gpfifo_get; 1557 ch->timeout_gpfifo_get = gpfifo_get;