From: Ben Skeggs Date: Thu, 20 Aug 2015 04:54:11 +0000 (+1000) Subject: drm/nouveau/ltc: switch to new-style timer macros X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1302bcbb8229b0575401be87765277629330384a;p=linux-beck.git drm/nouveau/ltc: switch to new-style timer macros Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gf100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gf100.c index df60ee264b95..7e60a1393fc8 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gf100.c +++ b/drivers/gpu/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/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm107.c b/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm107.c index 3f009bb76226..438085e978ec 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm107.c +++ b/drivers/gpu/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; + ); + } } }