diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2009-02-22 11:09:11 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2009-02-22 11:40:12 +1000 |
commit | e033cbf09aef59aed3ef1efb67b237815e757e87 (patch) | |
tree | cfcc0413d70eee925529060a04fb0b3a252419b9 | |
parent | f38b6546098eddd2a3ddb1b7b75ba03d8e5a7518 (diff) |
nv50: use nv_wait for PRAMIN page table update flushes
-rw-r--r-- | shared-core/nv50_instmem.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/shared-core/nv50_instmem.c b/shared-core/nv50_instmem.c index 4417a6a5..545196b9 100644 --- a/shared-core/nv50_instmem.c +++ b/shared-core/nv50_instmem.c @@ -304,9 +304,18 @@ nv50_instmem_bind(struct drm_device *dev, struct nouveau_gpuobj *gpuobj) dev_priv->engine.instmem.finish_access(dev); nv_wr32(0x100c80, 0x00040001); - while(nv_rd32(0x100c80) & 1); + if (!nv_wait(0x100c80, 0x00000001, 0x00000000)) { + DRM_ERROR("timeout: (0x100c80 & 1) == 0 (1)\n"); + DRM_ERROR("0x100c80 = 0x%08x\n", nv_rd32(0x100c80)); + return -EBUSY; + } + nv_wr32(0x100c80, 0x00060001); - while(nv_rd32(0x100c80) & 1); + if (!nv_wait(0x100c80, 0x00000001, 0x00000000)) { + DRM_ERROR("timeout: (0x100c80 & 1) == 0 (2)\n"); + DRM_ERROR("0x100c80 = 0x%08x\n", nv_rd32(0x100c80)); + return -EBUSY; + } gpuobj->im_bound = 1; return 0; |