diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-20 04:54:10 (GMT) |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-28 02:40:19 (GMT) |
commit | 4dd308f446c31e8f4a2b5033ba2de6f53f015114 (patch) | |
tree | a4fe51ba1542d4c64ffab3dd38811c3ecf40a02f /drivers/gpu/drm/nouveau | |
parent | 56f67dc19623b6cd4db57ee07d6f0cad32bcd5af (diff) | |
download | linux-4dd308f446c31e8f4a2b5033ba2de6f53f015114.tar.xz |
drm/nouveau/bar: switch to new-style timer macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c index dcfb118..a47d64d 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bar/nv50.c @@ -85,8 +85,10 @@ nv50_bar_flush(struct nvkm_bar *obj) unsigned long flags; spin_lock_irqsave(&bar->lock, flags); nvkm_wr32(device, 0x00330c, 0x00000001); - if (!nv_wait(bar, 0x00330c, 0x00000002, 0x00000000)) - nv_warn(bar, "flush timeout\n"); + nvkm_msec(device, 2000, + if (!(nvkm_rd32(device, 0x00330c) & 0x00000002)) + break; + ); spin_unlock_irqrestore(&bar->lock, flags); } @@ -98,8 +100,10 @@ g84_bar_flush(struct nvkm_bar *obj) unsigned long flags; spin_lock_irqsave(&bar->lock, flags); nvkm_wr32(device, 0x070000, 0x00000001); - if (!nv_wait(bar, 0x070000, 0x00000002, 0x00000000)) - nv_warn(bar, "flush timeout\n"); + nvkm_msec(device, 2000, + if (!(nvkm_rd32(device, 0x070000) & 0x00000002)) + break; + ); spin_unlock_irqrestore(&bar->lock, flags); } @@ -240,10 +244,11 @@ nv50_bar_init(struct nvkm_object *object) nvkm_mask(device, 0x000200, 0x00000100, 0x00000000); nvkm_mask(device, 0x000200, 0x00000100, 0x00000100); nvkm_wr32(device, 0x100c80, 0x00060001); - if (!nv_wait(bar, 0x100c80, 0x00000001, 0x00000000)) { - nv_error(bar, "vm flush timeout\n"); + if (nvkm_msec(device, 2000, + if (!(nvkm_rd32(device, 0x100c80) & 0x00000001)) + break; + ) < 0) return -EBUSY; - } nvkm_wr32(device, 0x001704, 0x00000000 | bar->mem->addr >> 12); nvkm_wr32(device, 0x001704, 0x40000000 | bar->mem->addr >> 12); |