drm/nouveau/fb: read TILE_BASE after writing it to avoid a hardware race
authorBen Skeggs <bskeggs@redhat.com>
Wed, 10 Oct 2012 01:09:48 +0000 (11:09 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 28 Nov 2012 23:56:29 +0000 (09:56 +1000)
Apparently needed for turbocache nv4x chips at least, we'll just do it
everywhere...

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/core/subdev/fb/nv10.c
drivers/gpu/drm/nouveau/core/subdev/fb/nv20.c
drivers/gpu/drm/nouveau/core/subdev/fb/nv41.c
drivers/gpu/drm/nouveau/core/subdev/fb/nv44.c

index f037a422d2f4fe2c17c59493f55fba32ca8e6ec8..1ecd7033514e661a6f0cb2b595678989796fe5ba 100644 (file)
@@ -54,6 +54,7 @@ nv10_fb_tile_prog(struct nouveau_fb *pfb, int i, struct nouveau_fb_tile *tile)
        nv_wr32(pfb, 0x100244 + (i * 0x10), tile->limit);
        nv_wr32(pfb, 0x100248 + (i * 0x10), tile->pitch);
        nv_wr32(pfb, 0x100240 + (i * 0x10), tile->addr);
+       nv_rd32(pfb, 0x100240 + (i * 0x10));
 }
 
 static int
index 2c30f238f23c25b9b52ba4e90308e0cc8a94e040..307d5c73b7048f7619d0ab0ce78f982e96b4c0f2 100644 (file)
@@ -83,6 +83,7 @@ nv20_fb_tile_prog(struct nouveau_fb *pfb, int i, struct nouveau_fb_tile *tile)
        nv_wr32(pfb, 0x100244 + (i * 0x10), tile->limit);
        nv_wr32(pfb, 0x100248 + (i * 0x10), tile->pitch);
        nv_wr32(pfb, 0x100240 + (i * 0x10), tile->addr);
+       nv_rd32(pfb, 0x100240 + (i * 0x10));
        nv_wr32(pfb, 0x100300 + (i * 0x04), tile->zcomp);
 }
 
index a6a10665cf385262808dfd113eba69d360f245ee..3c974173e184c4cdad8b3d907378f127846d281a 100644 (file)
@@ -36,6 +36,7 @@ nv41_fb_tile_prog(struct nouveau_fb *pfb, int i, struct nouveau_fb_tile *tile)
        nv_wr32(pfb, 0x100604 + (i * 0x10), tile->limit);
        nv_wr32(pfb, 0x100608 + (i * 0x10), tile->pitch);
        nv_wr32(pfb, 0x100600 + (i * 0x10), tile->addr);
+       nv_rd32(pfb, 0x100600 + (i * 0x10));
        nv_wr32(pfb, 0x100700 + (i * 0x04), tile->zcomp);
 }
 
index c62a07781fe9f8fc8bc7bc5b1c7ead7dd1246502..538b0de8152b148deeb68716feaf227cc3ce310c 100644 (file)
@@ -46,6 +46,7 @@ nv44_fb_tile_prog(struct nouveau_fb *pfb, int i, struct nouveau_fb_tile *tile)
        nv_wr32(pfb, 0x100604 + (i * 0x10), tile->limit);
        nv_wr32(pfb, 0x100608 + (i * 0x10), tile->pitch);
        nv_wr32(pfb, 0x100600 + (i * 0x10), tile->addr);
+       nv_rd32(pfb, 0x100600 + (i * 0x10));
 }
 
 int