diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2014-02-23 23:27:25 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-03-26 14:00:52 +1000 |
commit | 5c0633e6ee31e454ed92d85cf9fc09c77dab46a4 (patch) | |
tree | 6ad3f2a747d64a010277604af3baa9ea25b7f260 | |
parent | 87032e11d94d753c77614c2380829b21c4eb7495 (diff) | |
download | op-kernel-dev-5c0633e6ee31e454ed92d85cf9fc09c77dab46a4.zip op-kernel-dev-5c0633e6ee31e454ed92d85cf9fc09c77dab46a4.tar.gz |
drm/nve0/fifo: use runlist event instead of polling
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c b/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c index ad8e678..bd67906 100644 --- a/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c @@ -118,7 +118,9 @@ nve0_fifo_runlist_update(struct nve0_fifo_priv *priv, u32 engine) nv_wr32(priv, 0x002270, cur->addr >> 12); nv_wr32(priv, 0x002274, (engine << 20) | (p >> 3)); - if (!nv_wait(priv, 0x002284 + (engine * 8), 0x00100000, 0x00000000)) + if (wait_event_timeout(engn->wait, !(nv_rd32(priv, 0x002284 + + (engine * 0x08)) & 0x00100000), + msecs_to_jiffies(2000)) == 0) nv_error(priv, "runlist %d update timeout\n", engine); mutex_unlock(&nv_subdev(priv)->mutex); } |