Skip to content

Commit

Permalink
drm/nouveau/bus: switch to new-style timer macros
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Ben Skeggs committed Aug 28, 2015
1 parent 4dd308f commit 4f31c84
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion drivers/gpu/drm/nouveau/nvkm/subdev/bus/g94.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
Expand Down
8 changes: 7 additions & 1 deletion drivers/gpu/drm/nouveau/nvkm/subdev/bus/nv50.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4f31c84

Please sign in to comment.