diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c index 10a1001e..f91dd52d 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | |||
@@ -279,6 +279,7 @@ int gk20a_channel_syncpt_incr(struct gk20a_channel_sync *s, | |||
279 | int gk20a_channel_syncpt_incr_user_syncpt(struct gk20a_channel_sync *s, | 279 | int gk20a_channel_syncpt_incr_user_syncpt(struct gk20a_channel_sync *s, |
280 | struct priv_cmd_entry **entry, | 280 | struct priv_cmd_entry **entry, |
281 | struct gk20a_channel_fence *fence, | 281 | struct gk20a_channel_fence *fence, |
282 | bool wfi, | ||
282 | u32 *id, u32 *thresh) | 283 | u32 *id, u32 *thresh) |
283 | { | 284 | { |
284 | struct gk20a_channel_syncpt *sp = | 285 | struct gk20a_channel_syncpt *sp = |
@@ -286,8 +287,10 @@ int gk20a_channel_syncpt_incr_user_syncpt(struct gk20a_channel_sync *s, | |||
286 | /* Need to do 'host incr + wfi' or 'gfx incr' since we return the fence | 287 | /* Need to do 'host incr + wfi' or 'gfx incr' since we return the fence |
287 | * to user space. */ | 288 | * to user space. */ |
288 | int err = __gk20a_channel_syncpt_incr(s, | 289 | int err = __gk20a_channel_syncpt_incr(s, |
289 | sp->c->obj_class == KEPLER_C /* use gfx class? */, | 290 | wfi && |
290 | sp->c->obj_class != KEPLER_C /* wfi if host class */, | 291 | sp->c->obj_class == KEPLER_C /* use gfx class? */, |
292 | wfi && | ||
293 | sp->c->obj_class != KEPLER_C /* wfi if host class */, | ||
291 | true /* register irq */, | 294 | true /* register irq */, |
292 | entry, fence); | 295 | entry, fence); |
293 | if (err) | 296 | if (err) |
@@ -300,6 +303,7 @@ int gk20a_channel_syncpt_incr_user_syncpt(struct gk20a_channel_sync *s, | |||
300 | int gk20a_channel_syncpt_incr_user_fd(struct gk20a_channel_sync *s, | 303 | int gk20a_channel_syncpt_incr_user_fd(struct gk20a_channel_sync *s, |
301 | struct priv_cmd_entry **entry, | 304 | struct priv_cmd_entry **entry, |
302 | struct gk20a_channel_fence *fence, | 305 | struct gk20a_channel_fence *fence, |
306 | bool wfi, | ||
303 | int *fd) | 307 | int *fd) |
304 | { | 308 | { |
305 | #ifdef CONFIG_SYNC | 309 | #ifdef CONFIG_SYNC |
@@ -307,7 +311,7 @@ int gk20a_channel_syncpt_incr_user_fd(struct gk20a_channel_sync *s, | |||
307 | struct nvhost_ctrl_sync_fence_info pt; | 311 | struct nvhost_ctrl_sync_fence_info pt; |
308 | struct gk20a_channel_syncpt *sp = | 312 | struct gk20a_channel_syncpt *sp = |
309 | container_of(s, struct gk20a_channel_syncpt, ops); | 313 | container_of(s, struct gk20a_channel_syncpt, ops); |
310 | err = gk20a_channel_syncpt_incr_user_syncpt(s, entry, fence, | 314 | err = gk20a_channel_syncpt_incr_user_syncpt(s, entry, fence, wfi, |
311 | &pt.id, &pt.thresh); | 315 | &pt.id, &pt.thresh); |
312 | if (err) | 316 | if (err) |
313 | return err; | 317 | return err; |