summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
index 2ea5b4be..70930291 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
@@ -38,6 +38,8 @@ 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
41struct gpfifo { 43struct gpfifo {
42 u32 entry0; 44 u32 entry0;
43 u32 entry1; 45 u32 entry1;
@@ -70,6 +72,13 @@ struct channel_gk20a_job {
70 struct list_head list; 72 struct list_head list;
71}; 73};
72 74
75struct channel_gk20a_timeout {
76 struct delayed_work wq;
77 struct mutex lock;
78 bool initialized;
79 struct channel_gk20a_job *job;
80};
81
73struct channel_gk20a_poll_events { 82struct channel_gk20a_poll_events {
74 struct mutex lock; 83 struct mutex lock;
75 bool events_enabled; 84 bool events_enabled;
@@ -126,6 +135,8 @@ struct channel_gk20a {
126 u32 timeout_accumulated_ms; 135 u32 timeout_accumulated_ms;
127 u32 timeout_gpfifo_get; 136 u32 timeout_gpfifo_get;
128 137
138 struct channel_gk20a_timeout timeout;
139
129 bool cmds_pending; 140 bool cmds_pending;
130 struct { 141 struct {
131 /* These fences should be accessed with submit_lock held. */ 142 /* These fences should be accessed with submit_lock held. */