diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 7 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.h | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/platform_gk20a.h | 3 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c | 4 |
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 | ||
1477 | static u32 gk20a_get_channel_watchdog_timeout(struct channel_gk20a *ch) | 1477 | static 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 | |||
43 | struct gpfifo { | 41 | struct 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, |