From: Michel D?nzer <[email protected]>
This fixes a ring test failure reported on a Kabini system which was
triggered by write-combined CPU mappings of the ring buffers.
Reported-and-Tested-by: Will Trives <renevant at internode.on.net>
Signed-off-by: Michel D?nzer <michel.daenzer at amd.com>
---
drivers/gpu/drm/radeon/radeon_ring.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/radeon/radeon_ring.c
b/drivers/gpu/drm/radeon/radeon_ring.c
index 5b4e0cf..6dff529 100644
--- a/drivers/gpu/drm/radeon/radeon_ring.c
+++ b/drivers/gpu/drm/radeon/radeon_ring.c
@@ -193,6 +193,10 @@ void radeon_ring_commit(struct radeon_device *rdev, struct
radeon_ring *ring)
radeon_ring_write(ring, ring->nop);
}
mb();
+ /* This is necessary to prevent ring test failures on some systems
+ * with write-combined CPU mappings of the ring buffers
+ */
+ (void)ring->ring[ring->wptr];
/* If we are emitting the HDP flush via MMIO, we need to do it after
* all CPU writes to VRAM finished.
*/
--
2.0.1