]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/nouveau/bus: 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:19 +0000 (12:40 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvkm/subdev/bus/g94.c
drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv50.c

index b23475bbf3ad9561f7d5ca6b63467cb1133346f4..10ac729a4d903bf4df3d0497a05bdbd40d05d2aa 100644 (file)
@@ -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 *
index 69d55b435c6c46ffb05f9db8310e731d5c1ecf15..1a9be08604f5cacfe7d030c1787ff4ae30f2831c 100644 (file)
@@ -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