diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-20 14:54:11 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-28 12:40:20 +1000 |
commit | cf07d861ce3c4bfd9d45f9e66f30cbfb56dca3a0 (patch) | |
tree | 13e4a1ca934d7fc2f6a86e95629ab07a28bf4fbc /drivers/gpu/drm/nouveau | |
parent | 6979c6303a4abf263753cd9d577d79f05c6e8c47 (diff) | |
download | blackbird-op-linux-cf07d861ce3c4bfd9d45f9e66f30cbfb56dca3a0.tar.gz blackbird-op-linux-cf07d861ce3c4bfd9d45f9e66f30cbfb56dca3a0.zip |
drm/nouveau/fb: switch to new-style timer macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv40.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv40.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv40.c index 54d8cb55ad95..56bdfeeab8e7 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv40.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv40.c @@ -94,8 +94,19 @@ nv40_ram_prog(struct nvkm_fb *fb) for (i = 0; i < 2; i++) { if (!(crtc_mask & (1 << i))) continue; - nv_wait(fb, 0x600808 + (i * 0x2000), 0x00010000, 0x00000000); - nv_wait(fb, 0x600808 + (i * 0x2000), 0x00010000, 0x00010000); + + nvkm_msec(device, 2000, + u32 tmp = nvkm_rd32(device, 0x600808 + (i * 0x2000)); + if (!(tmp & 0x00010000)) + break; + ); + + nvkm_msec(device, 2000, + u32 tmp = nvkm_rd32(device, 0x600808 + (i * 0x2000)); + if ( (tmp & 0x00010000)) + break; + ); + nvkm_wr08(device, 0x0c03c4 + (i * 0x2000), 0x01); nvkm_wr08(device, 0x0c03c5 + (i * 0x2000), sr1[i] | 0x20); } @@ -155,7 +166,13 @@ nv40_ram_prog(struct nvkm_fb *fb) for (i = 0; i < 2; i++) { if (!(crtc_mask & (1 << i))) continue; - nv_wait(fb, 0x600808 + (i * 0x2000), 0x00010000, 0x00010000); + + nvkm_msec(device, 2000, + u32 tmp = nvkm_rd32(device, 0x600808 + (i * 0x2000)); + if ( (tmp & 0x00010000)) + break; + ); + nvkm_wr08(device, 0x0c03c4 + (i * 0x2000), 0x01); nvkm_wr08(device, 0x0c03c5 + (i * 0x2000), sr1[i]); } |