From 632a86f7cdec9f795fdef56ad028694c72d4e9d4 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Wed, 25 Nov 2015 15:22:24 +0530 Subject: gpu: nvgpu: IOCTL to disable watchdog per-channel Add IOCTL NVGPU_IOCTL_CHANNEL_WDT to disable/enable watchdog per-channel Also, if watchdog is disabled, we currently schedule the worker with MAX timeout. Instead of this, do not schedule any worker if watchdog is disabled Bug 1683059 Bug 1700277 Change-Id: I7f6bec84adeedb74e014ed6d1471317b854df84c Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/837962 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- include/uapi/linux/nvgpu.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index 025f2c9b..976464e4 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h @@ -802,6 +802,13 @@ struct nvgpu_cycle_stats_snapshot_args { #define NVGPU_IOCTL_CHANNEL_CYCLE_STATS_SNAPSHOT_CMD_ATTACH 1 #define NVGPU_IOCTL_CHANNEL_CYCLE_STATS_SNAPSHOT_CMD_DETACH 2 +/* disable watchdog per-channel */ +struct nvgpu_channel_wdt_args { + __u32 wdt_status; + __u32 padding; +}; +#define NVGPU_IOCTL_CHANNEL_DISABLE_WDT 1 +#define NVGPU_IOCTL_CHANNEL_ENABLE_WDT 2 #define NVGPU_IOCTL_CHANNEL_SET_NVMAP_FD \ _IOW(NVGPU_IOCTL_MAGIC, 5, struct nvgpu_set_nvmap_fd_args) @@ -843,9 +850,11 @@ struct nvgpu_cycle_stats_snapshot_args { _IOW(NVGPU_IOCTL_MAGIC, 117, struct nvgpu_channel_events_ctrl_args) #define NVGPU_IOCTL_CHANNEL_CYCLE_STATS_SNAPSHOT \ _IOWR(NVGPU_IOCTL_MAGIC, 118, struct nvgpu_cycle_stats_snapshot_args) +#define NVGPU_IOCTL_CHANNEL_WDT \ + _IOW(NVGPU_IOCTL_MAGIC, 119, struct nvgpu_channel_wdt_args) #define NVGPU_IOCTL_CHANNEL_LAST \ - _IOC_NR(NVGPU_IOCTL_CHANNEL_CYCLE_STATS_SNAPSHOT) + _IOC_NR(NVGPU_IOCTL_CHANNEL_WDT) #define NVGPU_IOCTL_CHANNEL_MAX_ARG_SIZE sizeof(struct nvgpu_submit_gpfifo_args) /* -- cgit v1.2.2