mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: Move ch_wdt_timeout to gk20a
Copy watchdog timeout from platform structure to gk20a and use it from gk20a. JIRA NVGPU-16 Change-Id: Iab70253a7f0e1d28f2e3209285b3f4c476ce9279 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1473705 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
162108d070
commit
5e33f58a5e
@@ -61,6 +61,8 @@ static void nvgpu_init_vars(struct gk20a *g)
|
|||||||
|
|
||||||
static void nvgpu_init_timeout(struct gk20a *g)
|
static void nvgpu_init_timeout(struct gk20a *g)
|
||||||
{
|
{
|
||||||
|
struct gk20a_platform *platform = dev_get_drvdata(g->dev);
|
||||||
|
|
||||||
g->gr_idle_timeout_default = CONFIG_GK20A_DEFAULT_TIMEOUT;
|
g->gr_idle_timeout_default = CONFIG_GK20A_DEFAULT_TIMEOUT;
|
||||||
if (nvgpu_platform_is_silicon(g))
|
if (nvgpu_platform_is_silicon(g))
|
||||||
g->timeouts_enabled = true;
|
g->timeouts_enabled = true;
|
||||||
@@ -68,6 +70,7 @@ static void nvgpu_init_timeout(struct gk20a *g)
|
|||||||
g->gr_idle_timeout_default = GK20A_TIMEOUT_FPGA;
|
g->gr_idle_timeout_default = GK20A_TIMEOUT_FPGA;
|
||||||
g->timeouts_enabled = true;
|
g->timeouts_enabled = true;
|
||||||
}
|
}
|
||||||
|
g->ch_wdt_timeout_ms = platform->ch_wdt_timeout_ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nvgpu_init_timeslice(struct gk20a *g)
|
static void nvgpu_init_timeslice(struct gk20a *g)
|
||||||
|
|||||||
@@ -1377,8 +1377,7 @@ bool gk20a_channel_update_and_check_timeout(struct channel_gk20a *ch,
|
|||||||
|
|
||||||
static u32 gk20a_get_channel_watchdog_timeout(struct channel_gk20a *ch)
|
static u32 gk20a_get_channel_watchdog_timeout(struct channel_gk20a *ch)
|
||||||
{
|
{
|
||||||
struct gk20a_platform *platform = gk20a_get_platform(ch->g->dev);
|
return ch->g->ch_wdt_timeout_ms;
|
||||||
return platform->ch_wdt_timeout_ms;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 get_gp_free_count(struct channel_gk20a *c)
|
static u32 get_gp_free_count(struct channel_gk20a *c)
|
||||||
@@ -1490,9 +1489,7 @@ static void __gk20a_channel_timeout_start(struct channel_gk20a *ch)
|
|||||||
*/
|
*/
|
||||||
static void gk20a_channel_timeout_start(struct channel_gk20a *ch)
|
static void gk20a_channel_timeout_start(struct channel_gk20a *ch)
|
||||||
{
|
{
|
||||||
struct gk20a_platform *platform = gk20a_get_platform(ch->g->dev);
|
if (!ch->g->timeouts_enabled || !gk20a_get_channel_watchdog_timeout(ch))
|
||||||
|
|
||||||
if (!ch->g->timeouts_enabled || !platform->ch_wdt_timeout_ms)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!ch->wdt_enabled)
|
if (!ch->wdt_enabled)
|
||||||
|
|||||||
@@ -976,6 +976,7 @@ struct gk20a {
|
|||||||
#else
|
#else
|
||||||
bool timeouts_enabled;
|
bool timeouts_enabled;
|
||||||
#endif
|
#endif
|
||||||
|
unsigned int ch_wdt_timeout_ms;
|
||||||
|
|
||||||
struct nvgpu_mutex poweroff_lock;
|
struct nvgpu_mutex poweroff_lock;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user