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:37:32 +1000 |
commit | 747d45870e868cecb41434198dbd17e91937cb39 (patch) | |
tree | 3a9b619b94429c1062329f2b99e17aafd75705d8 /drm/nouveau/nvkm/subdev/ltc | |
parent | 2008a783ccdefef8ce3e3fdbe1250ea3d15b875e (diff) | |
download | nouveau-747d45870e868cecb41434198dbd17e91937cb39.tar.gz |
ltc: switch to new-style timer macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drm/nouveau/nvkm/subdev/ltc')
-rw-r--r-- | drm/nouveau/nvkm/subdev/ltc/gf100.c | 10 | ||||
-rw-r--r-- | drm/nouveau/nvkm/subdev/ltc/gm107.c | 10 |
2 files changed, 16 insertions, 4 deletions
diff --git a/drm/nouveau/nvkm/subdev/ltc/gf100.c b/drm/nouveau/nvkm/subdev/ltc/gf100.c index df60ee264..7e60a1393 100644 --- a/drm/nouveau/nvkm/subdev/ltc/gf100.c +++ b/drm/nouveau/nvkm/subdev/ltc/gf100.c @@ -39,10 +39,16 @@ gf100_ltc_cbc_clear(struct nvkm_ltc_priv *ltc, u32 start, u32 limit) void gf100_ltc_cbc_wait(struct nvkm_ltc_priv *ltc) { + struct nvkm_device *device = ltc->base.subdev.device; int c, s; for (c = 0; c < ltc->ltc_nr; c++) { - for (s = 0; s < ltc->lts_nr; s++) - nv_wait(ltc, 0x1410c8 + c * 0x2000 + s * 0x400, ~0, 0); + for (s = 0; s < ltc->lts_nr; s++) { + const u32 addr = 0x1410c8 + (c * 0x2000) + (s * 0x400); + nvkm_msec(device, 2000, + if (!nvkm_rd32(device, addr)) + break; + ); + } } } diff --git a/drm/nouveau/nvkm/subdev/ltc/gm107.c b/drm/nouveau/nvkm/subdev/ltc/gm107.c index 3f009bb76..438085e97 100644 --- a/drm/nouveau/nvkm/subdev/ltc/gm107.c +++ b/drm/nouveau/nvkm/subdev/ltc/gm107.c @@ -38,10 +38,16 @@ gm107_ltc_cbc_clear(struct nvkm_ltc_priv *ltc, u32 start, u32 limit) static void gm107_ltc_cbc_wait(struct nvkm_ltc_priv *ltc) { + struct nvkm_device *device = ltc->base.subdev.device; int c, s; for (c = 0; c < ltc->ltc_nr; c++) { - for (s = 0; s < ltc->lts_nr; s++) - nv_wait(ltc, 0x14046c + c * 0x2000 + s * 0x200, ~0, 0); + for (s = 0; s < ltc->lts_nr; s++) { + const u32 addr = 0x14046c + (c * 0x2000) + (s * 0x200); + nvkm_msec(device, 2000, + if (!nvkm_rd32(device, addr)) + break; + ); + } } } |