Commit 37eabb03 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/mpeg: switch to new-style timer macros

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent c4584adc
......@@ -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;
}
......
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment