diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2015-08-31 05:00:35 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2015-09-28 12:08:12 -0400 |
commit | 613990cb391c74436384d63d12240221565011d5 (patch) | |
tree | 27d7cd19bd84a6ce50fb579c5f6a08ada28ba5b7 /drivers/gpu/nvgpu/gk20a/gk20a.c | |
parent | cb8c102131ec96767e01981dc9a9d26e30593a70 (diff) |
gpu: nvgpu: implement per-channel watchdog
Implement per-channel watchdog/timer as per below rules :
- start the timer while submitting first job on channel or if
no timer is already running
- cancel the timer when job completes
- re-start the timer if there is any incomplete job left
in the channel's queue
- trigger appropriate recovery method as part of timeout
handling mechanism
Handle the timeout as per below :
- get timed out channel, and job data
- disable activity on all engines
- check if fence is really pending
- get information on failing engine
- if no engine is failing, just abort the channel
- if engine is failing, trigger the recovery
Also, add flag "ch_wdt_enabled" to enable/disable channel
watchdog mechanism. Watchdog can also be disabled using
global flag "timeouts_enabled"
Set the watchdog time to be 5s using macro
NVGPU_CHANNEL_WATCHDOG_DEFAULT_TIMEOUT_MS
Bug 200133289
Change-Id: I401cf14dd34a210bc429f31bd5216a361edf1237
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/797072
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index c0889571..fb8b8b14 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -667,6 +667,7 @@ static int gk20a_init_support(struct platform_device *dev) | |||
667 | 667 | ||
668 | mutex_init(&g->dbg_sessions_lock); | 668 | mutex_init(&g->dbg_sessions_lock); |
669 | mutex_init(&g->client_lock); | 669 | mutex_init(&g->client_lock); |
670 | mutex_init(&g->ch_wdt_lock); | ||
670 | 671 | ||
671 | g->remove_support = gk20a_remove_support; | 672 | g->remove_support = gk20a_remove_support; |
672 | return 0; | 673 | return 0; |
@@ -1449,6 +1450,7 @@ static int gk20a_probe(struct platform_device *dev) | |||
1449 | CONFIG_GK20A_DEFAULT_TIMEOUT; | 1450 | CONFIG_GK20A_DEFAULT_TIMEOUT; |
1450 | if (tegra_platform_is_silicon()) | 1451 | if (tegra_platform_is_silicon()) |
1451 | gk20a->timeouts_enabled = true; | 1452 | gk20a->timeouts_enabled = true; |
1453 | gk20a->ch_wdt_enabled = true; | ||
1452 | 1454 | ||
1453 | /* Set up initial power settings. For non-slicon platforms, disable * | 1455 | /* Set up initial power settings. For non-slicon platforms, disable * |
1454 | * power features and for silicon platforms, read from platform data */ | 1456 | * power features and for silicon platforms, read from platform data */ |