From ff417a72e29249402acf13eb597caced4900a491 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Mon, 5 Oct 2015 11:46:04 +0530 Subject: 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 Reviewed-on: http://git-master/r/810956 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c') 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, static u32 gk20a_get_channel_watchdog_timeout(struct channel_gk20a *ch) { - if (ch->g->timeouts_enabled && ch->g->ch_wdt_enabled) - return NVGPU_CHANNEL_WATCHDOG_DEFAULT_TIMEOUT_MS; + struct gk20a_platform *platform = gk20a_get_platform(ch->g->dev); + + if (ch->g->timeouts_enabled && ch->g->ch_wdt_enabled && + platform->ch_wdt_timeout_ms) + return platform->ch_wdt_timeout_ms; else return (u32)MAX_SCHEDULE_TIMEOUT; } -- cgit v1.2.2