summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2014-04-01 01:28:44 -0400
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:09:53 -0400
commit2fbf6e7afb316d698d0062828876eeed1a1b43b2 (patch)
treefacd78d1a24f074e5b4894169ae3ef30ef651d97 /drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c
parentaf8c1dc3a834850512f1fba863077048a3e14f21 (diff)
gpu: nvgpu: Allow suppressing WFI on submit
Allow suppressing WFI when submitting work and requesting a fence back. Bug 1491545 Change-Id: Ic3d061bb4f116cf7ea68dbd6a1b2ace9f11d0ab5 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/390457
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c10
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,
279int gk20a_channel_syncpt_incr_user_syncpt(struct gk20a_channel_sync *s, 279int 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,
300int gk20a_channel_syncpt_incr_user_fd(struct gk20a_channel_sync *s, 303int 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;