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
This commit is contained in:
Terje Bergstrom
2014-04-01 08:28:44 +03:00
committed by Dan Willemsen
parent af8c1dc3a8
commit 2fbf6e7afb
3 changed files with 16 additions and 5 deletions

View File

@@ -279,6 +279,7 @@ int gk20a_channel_syncpt_incr(struct gk20a_channel_sync *s,
int gk20a_channel_syncpt_incr_user_syncpt(struct gk20a_channel_sync *s,
struct priv_cmd_entry **entry,
struct gk20a_channel_fence *fence,
bool wfi,
u32 *id, u32 *thresh)
{
struct gk20a_channel_syncpt *sp =
@@ -286,8 +287,10 @@ int gk20a_channel_syncpt_incr_user_syncpt(struct gk20a_channel_sync *s,
/* Need to do 'host incr + wfi' or 'gfx incr' since we return the fence
* to user space. */
int err = __gk20a_channel_syncpt_incr(s,
sp->c->obj_class == KEPLER_C /* use gfx class? */,
sp->c->obj_class != KEPLER_C /* wfi if host class */,
wfi &&
sp->c->obj_class == KEPLER_C /* use gfx class? */,
wfi &&
sp->c->obj_class != KEPLER_C /* wfi if host class */,
true /* register irq */,
entry, fence);
if (err)
@@ -300,6 +303,7 @@ int gk20a_channel_syncpt_incr_user_syncpt(struct gk20a_channel_sync *s,
int gk20a_channel_syncpt_incr_user_fd(struct gk20a_channel_sync *s,
struct priv_cmd_entry **entry,
struct gk20a_channel_fence *fence,
bool wfi,
int *fd)
{
#ifdef CONFIG_SYNC
@@ -307,7 +311,7 @@ int gk20a_channel_syncpt_incr_user_fd(struct gk20a_channel_sync *s,
struct nvhost_ctrl_sync_fence_info pt;
struct gk20a_channel_syncpt *sp =
container_of(s, struct gk20a_channel_syncpt, ops);
err = gk20a_channel_syncpt_incr_user_syncpt(s, entry, fence,
err = gk20a_channel_syncpt_incr_user_syncpt(s, entry, fence, wfi,
&pt.id, &pt.thresh);
if (err)
return err;