mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: Add NVGPU_CHANNEL_WDT flag
NVGPU_CHANNEL_WDT feature is embedded within the NVGPU_CHANNEL_WDT flag to allow it to be compiled out for safety builds. Jira NVGPU-3012 Change-Id: I0ca54af9d7b1b8e01f4090442341eaaadca8e339 Signed-off-by: Debarshi Dutta <ddutta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2114480 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
bf561f38f7
commit
1dea88c6c7
@@ -1338,7 +1338,9 @@ static int gk20a_cde_load(struct gk20a_cde_ctx *cde_ctx)
|
||||
goto err_get_gk20a_channel;
|
||||
}
|
||||
|
||||
#ifdef NVGPU_CHANNEL_WDT
|
||||
ch->wdt.enabled = false;
|
||||
#endif
|
||||
|
||||
/* bind the channel to the vm */
|
||||
err = g->ops.mm.vm_bind_channel(g->mm.cde.vm, ch);
|
||||
|
||||
@@ -285,6 +285,7 @@ int gk20a_channel_free_cycle_stats_snapshot(struct nvgpu_channel *ch)
|
||||
static int gk20a_channel_set_wdt_status(struct nvgpu_channel *ch,
|
||||
struct nvgpu_channel_wdt_args *args)
|
||||
{
|
||||
#ifdef NVGPU_CHANNEL_WDT
|
||||
u32 status = args->wdt_status & (NVGPU_IOCTL_CHANNEL_DISABLE_WDT |
|
||||
NVGPU_IOCTL_CHANNEL_ENABLE_WDT);
|
||||
|
||||
@@ -302,6 +303,9 @@ static int gk20a_channel_set_wdt_status(struct nvgpu_channel *ch,
|
||||
NVGPU_IOCTL_CHANNEL_WDT_FLAG_DISABLE_DUMP) == 0;
|
||||
|
||||
return 0;
|
||||
#else
|
||||
return -EINVAL;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void gk20a_channel_free_error_notifiers(struct nvgpu_channel *ch)
|
||||
|
||||
Reference in New Issue
Block a user