diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | 9 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/sync_gk20a.c | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c index 10f1213b..d2d8c094 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | |||
@@ -122,7 +122,11 @@ static int gk20a_channel_syncpt_wait_fd(struct gk20a_channel_sync *s, int fd, | |||
122 | sync_fence_put(sync_fence); | 122 | sync_fence_put(sync_fence); |
123 | return -EINVAL; | 123 | return -EINVAL; |
124 | } | 124 | } |
125 | #if !(LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0)) | ||
125 | } | 126 | } |
127 | #else | ||
128 | } | ||
129 | #endif | ||
126 | 130 | ||
127 | num_wait_cmds = nvhost_sync_num_pts(sync_fence); | 131 | num_wait_cmds = nvhost_sync_num_pts(sync_fence); |
128 | if (num_wait_cmds == 0) { | 132 | if (num_wait_cmds == 0) { |
@@ -160,8 +164,11 @@ static int gk20a_channel_syncpt_wait_fd(struct gk20a_channel_sync *s, int fd, | |||
160 | wait_value); | 164 | wait_value); |
161 | #if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) | 165 | #if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) |
162 | i++; | 166 | i++; |
163 | #endif | ||
164 | } | 167 | } |
168 | #else | ||
169 | } | ||
170 | #endif | ||
171 | |||
165 | WARN_ON(i != num_wait_cmds); | 172 | WARN_ON(i != num_wait_cmds); |
166 | sync_fence_put(sync_fence); | 173 | sync_fence_put(sync_fence); |
167 | 174 | ||
diff --git a/drivers/gpu/nvgpu/gk20a/sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/sync_gk20a.c index 21622d3d..3e14fa9c 100644 --- a/drivers/gpu/nvgpu/gk20a/sync_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/sync_gk20a.c | |||
@@ -151,12 +151,12 @@ static struct gk20a_sync_pt *gk20a_sync_pt_create_shared( | |||
151 | /* Store the dependency fence for this pt. */ | 151 | /* Store the dependency fence for this pt. */ |
152 | if (dependency) { | 152 | if (dependency) { |
153 | #if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) | 153 | #if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,0) |
154 | if (dependency->status == 0) { | 154 | if (dependency->status == 0) |
155 | #else | 155 | #else |
156 | if (!atomic_read(&dependency->status)) { | 156 | if (!atomic_read(&dependency->status)) |
157 | #endif | 157 | #endif |
158 | shared->dep = dependency; | 158 | shared->dep = dependency; |
159 | } else { | 159 | else { |
160 | shared->dep_timestamp = ktime_get(); | 160 | shared->dep_timestamp = ktime_get(); |
161 | sync_fence_put(dependency); | 161 | sync_fence_put(dependency); |
162 | } | 162 | } |