From 15f8a6e918c25da2f2b0b145baa9cdb54b4d0517 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Fri, 29 Jul 2022 21:24:57 +0000 Subject: [PATCH] WIP: radeon: flail around with r600 dma ring test --- sys/external/bsd/drm2/dist/drm/radeon/radeon_r600_dma.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/external/bsd/drm2/dist/drm/radeon/radeon_r600_dma.c b/sys/external/bsd/drm2/dist/drm/radeon/radeon_r600_dma.c index 08b60f996d5a..8d18dd0704da 100644 --- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_r600_dma.c +++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_r600_dma.c @@ -92,6 +92,7 @@ void r600_dma_set_wptr(struct radeon_device *rdev, struct radeon_ring *ring) { WREG32(DMA_RB_WPTR, (ring->wptr << 2) & 0x3fffc); + (void)RREG32(DMA_RB_WPTR); } /** @@ -249,6 +250,7 @@ int r600_dma_ring_test(struct radeon_device *rdev, tmp = 0xCAFEDEAD; rdev->wb.wb[index/4] = cpu_to_le32(tmp); + mb(); r = radeon_ring_lock(rdev, ring, 4); if (r) { @@ -262,6 +264,7 @@ int r600_dma_ring_test(struct radeon_device *rdev, radeon_ring_unlock_commit(rdev, ring, false); for (i = 0; i < rdev->usec_timeout; i++) { + mb(); tmp = le32_to_cpu(rdev->wb.wb[index/4]); if (tmp == 0xDEADBEEF) break;