summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2015-10-05 02:16:04 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2015-10-07 18:00:18 -0400
commitff417a72e29249402acf13eb597caced4900a491 (patch)
tree702d4ac58959eea0d6f33c2e94a81a23c1a576bf /drivers
parent488a2c38d17cd13b4453678d81c92db0664dd077 (diff)
gpu: nvgpu: make wdt timeout per-platform
Channel watchdog timeout is set to a costant value of 5s as of now Make this timeout platform specific and set it to 5s for gm20b and 7s for gk20a Bug 200133289 Change-Id: I6e7f0fed93a8d5b197ae46807131311196c6636f Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/810956 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.c7
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.h2
-rw-r--r--drivers/gpu/nvgpu/gk20a/platform_gk20a.h3
-rw-r--r--drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c4
4 files changed, 12 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
index 29fec4fe..e6a39b20 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
@@ -1476,8 +1476,11 @@ bool gk20a_channel_update_and_check_timeout(struct channel_gk20a *ch,
1476 1476
1477static u32 gk20a_get_channel_watchdog_timeout(struct channel_gk20a *ch) 1477static u32 gk20a_get_channel_watchdog_timeout(struct channel_gk20a *ch)
1478{ 1478{
1479 if (ch->g->timeouts_enabled && ch->g->ch_wdt_enabled) 1479 struct gk20a_platform *platform = gk20a_get_platform(ch->g->dev);
1480 return NVGPU_CHANNEL_WATCHDOG_DEFAULT_TIMEOUT_MS; 1480
1481 if (ch->g->timeouts_enabled && ch->g->ch_wdt_enabled &&
1482 platform->ch_wdt_timeout_ms)
1483 return platform->ch_wdt_timeout_ms;
1481 else 1484 else
1482 return (u32)MAX_SCHEDULE_TIMEOUT; 1485 return (u32)MAX_SCHEDULE_TIMEOUT;
1483} 1486}
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
index 9d74b412..20600207 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
@@ -38,8 +38,6 @@ struct gk20a_fence;
38#include "gr_gk20a.h" 38#include "gr_gk20a.h"
39#include "fence_gk20a.h" 39#include "fence_gk20a.h"
40 40
41#define NVGPU_CHANNEL_WATCHDOG_DEFAULT_TIMEOUT_MS 5000
42
43struct gpfifo { 41struct gpfifo {
44 u32 entry0; 42 u32 entry0;
45 u32 entry1; 43 u32 entry1;
diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h
index adacdb6b..0c3c6ff3 100644
--- a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h
@@ -79,6 +79,9 @@ struct gk20a_platform {
79 /* Adaptative ELPG: true = enable flase = disable */ 79 /* Adaptative ELPG: true = enable flase = disable */
80 bool enable_aelpg; 80 bool enable_aelpg;
81 81
82 /* Timeout for per-channel watchdog (in mS) */
83 u32 ch_wdt_timeout_ms;
84
82 /* Enable SMMU bypass by default */ 85 /* Enable SMMU bypass by default */
83 bool bypass_smmu; 86 bool bypass_smmu;
84 87
diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c
index 73e7303e..2c9cfb63 100644
--- a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c
+++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c
@@ -818,6 +818,8 @@ struct gk20a_platform gk20a_tegra_platform = {
818 818
819 .default_big_page_size = SZ_128K, 819 .default_big_page_size = SZ_128K,
820 820
821 .ch_wdt_timeout_ms = 7000,
822
821 .probe = gk20a_tegra_probe, 823 .probe = gk20a_tegra_probe,
822 .late_probe = gk20a_tegra_late_probe, 824 .late_probe = gk20a_tegra_late_probe,
823 .remove = gk20a_tegra_remove, 825 .remove = gk20a_tegra_remove,
@@ -865,6 +867,8 @@ struct gk20a_platform gm20b_tegra_platform = {
865 867
866 .default_big_page_size = SZ_128K, 868 .default_big_page_size = SZ_128K,
867 869
870 .ch_wdt_timeout_ms = 5000,
871
868 .probe = gk20a_tegra_probe, 872 .probe = gk20a_tegra_probe,
869 .late_probe = gk20a_tegra_late_probe, 873 .late_probe = gk20a_tegra_late_probe,
870 .remove = gk20a_tegra_remove, 874 .remove = gk20a_tegra_remove,