diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-20 14:54:11 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-28 12:40:19 +1000 |
commit | 4f31c84ebafd7b3940c2fe109fe173c62d097080 (patch) | |
tree | 252304b4578e23b4fb39860e62872cf9614f5157 /drivers/gpu/drm/nouveau/nvkm/subdev/bus | |
parent | 4dd308f446c31e8f4a2b5033ba2de6f53f015114 (diff) | |
download | blackbird-op-linux-4f31c84ebafd7b3940c2fe109fe173c62d097080.tar.gz blackbird-op-linux-4f31c84ebafd7b3940c2fe109fe173c62d097080.zip |
drm/nouveau/bus: switch to new-style timer macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/bus')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/bus/g94.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv50.c | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bus/g94.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bus/g94.c index b23475bbf3ad..10ac729a4d90 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bus/g94.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bus/g94.c @@ -40,7 +40,13 @@ g94_bus_hwsq_exec(struct nvkm_bus *bus, u32 *data, u32 size) nvkm_mask(device, 0x001098, 0x00000018, 0x00000018); nvkm_wr32(device, 0x00130c, 0x00000001); - return nv_wait(bus, 0x001308, 0x00000100, 0x00000000) ? 0 : -ETIMEDOUT; + if (nvkm_msec(device, 2000, + if (!(nvkm_rd32(device, 0x001308) & 0x00000100)) + break; + ) < 0) + return -ETIMEDOUT; + + return 0; } struct nvkm_oclass * diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv50.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv50.c index 69d55b435c6c..1a9be08604f5 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv50.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv50.c @@ -39,7 +39,13 @@ nv50_bus_hwsq_exec(struct nvkm_bus *bus, u32 *data, u32 size) nvkm_mask(device, 0x001098, 0x00000018, 0x00000018); nvkm_wr32(device, 0x00130c, 0x00000003); - return nv_wait(bus, 0x001308, 0x00000100, 0x00000000) ? 0 : -ETIMEDOUT; + if (nvkm_msec(device, 2000, + if (!(nvkm_rd32(device, 0x001308) & 0x00000100)) + break; + ) < 0) + return -ETIMEDOUT; + + return 0; } void |