diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2014-02-22 01:05:01 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-03-26 14:00:45 +1000 |
commit | 3cf6290a1d34ad46b2c591ee8cd200f918d0545f (patch) | |
tree | 268d8bb8718631526e08bbb9428d5d117798d92f /drivers/gpu/drm/nouveau/core/engine/fifo | |
parent | e2822b7aea5f694c31600a9b786aa9441ea18bc9 (diff) | |
download | op-kernel-dev-3cf6290a1d34ad46b2c591ee8cd200f918d0545f.zip op-kernel-dev-3cf6290a1d34ad46b2c591ee8cd200f918d0545f.tar.gz |
drm/nvc0/fifo: use runlist event instead of polling
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core/engine/fifo')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c index 97416c6..d396516 100644 --- a/drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c @@ -96,8 +96,10 @@ nvc0_fifo_runlist_update(struct nvc0_fifo_priv *priv) nv_wr32(priv, 0x002270, cur->addr >> 12); nv_wr32(priv, 0x002274, 0x01f00000 | (p >> 3)); - if (!nv_wait(priv, 0x00227c, 0x00100000, 0x00000000)) - nv_error(priv, "runlist update failed\n"); + if (wait_event_timeout(priv->runlist.wait, + !(nv_rd32(priv, 0x00227c) & 0x00100000), + msecs_to_jiffies(2000)) == 0) + nv_error(priv, "runlist update timeout\n"); mutex_unlock(&nv_subdev(priv)->mutex); } |