drm/nouveau/mpeg: switch to new-style timer macros
authorBen Skeggs <bskeggs@redhat.com>
Thu, 20 Aug 2015 04:54:11 +0000 (14:54 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 28 Aug 2015 02:40:21 +0000 (12:40 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c
drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv50.c

index 2b86575ddcde97febacd401fe3a2435e72350d2f..4ea554e81a2963f34965a11d8bac9a1fc6f7c579 100644 (file)
@@ -288,7 +288,10 @@ nv31_mpeg_init(struct nvkm_object *object)
        nvkm_wr32(device, 0x00b100, 0xffffffff);
        nvkm_wr32(device, 0x00b140, 0xffffffff);
 
-       if (!nv_wait(mpeg, 0x00b200, 0x00000001, 0x00000000)) {
+       if (nvkm_msec(device, 2000,
+               if (!(nvkm_rd32(device, 0x00b200) & 0x00000001))
+                       break;
+       ) < 0) {
                nv_error(mpeg, "timeout 0x%08x\n", nvkm_rd32(device, 0x00b200));
                return -EBUSY;
        }
index f83c78fa18a101da6d7445ad15ec9319f5f477ba..586ff06705babb92fb5e21cef1ea9f381979c157 100644 (file)
@@ -204,7 +204,10 @@ nv50_mpeg_init(struct nvkm_object *object)
        nvkm_wr32(device, 0x00b100, 0xffffffff);
        nvkm_wr32(device, 0x00b140, 0xffffffff);
 
-       if (!nv_wait(mpeg, 0x00b200, 0x00000001, 0x00000000)) {
+       if (nvkm_msec(device, 2000,
+               if (!(nvkm_rd32(device, 0x00b200) & 0x00000001))
+                       break;
+       ) < 0) {
                nv_error(mpeg, "timeout 0x%08x\n", nvkm_rd32(device, 0x00b200));
                return -EBUSY;
        }