diff mbox

drm/radeon: flush HDP in DMA ring test v2

Message ID 1412953123-1634-1-git-send-email-deathsimple@vodafone.de (mailing list archive)
State New, archived
Headers show

Commit Message

Christian König Oct. 10, 2014, 2:58 p.m. UTC
From: Christian König <christian.koenig@amd.com>

v1: Flush VRAM cache before each read when polling (r600_dma_ring_test only).
v2 (chk): rebased on current drm-fixes, apply to CIK as well.

Signed-off-by: Alexander Fyodorov <halcy at yandex.ru>
Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/radeon/cik_sdma.c | 1 +
 drivers/gpu/drm/radeon/r600_dma.c | 1 +
 2 files changed, 2 insertions(+)
diff mbox

Patch

diff --git a/drivers/gpu/drm/radeon/cik_sdma.c b/drivers/gpu/drm/radeon/cik_sdma.c
index c4ffa54..4c442a6 100644
--- a/drivers/gpu/drm/radeon/cik_sdma.c
+++ b/drivers/gpu/drm/radeon/cik_sdma.c
@@ -631,6 +631,7 @@  int cik_sdma_ring_test(struct radeon_device *rdev,
 	radeon_ring_write(ring, upper_32_bits(rdev->vram_scratch.gpu_addr));
 	radeon_ring_write(ring, 1); /* number of DWs to follow */
 	radeon_ring_write(ring, 0xDEADBEEF);
+	cik_sdma_hdp_flush_ring_emit(rdev, ring->idx);
 	radeon_ring_unlock_commit(rdev, ring, false);
 
 	for (i = 0; i < rdev->usec_timeout; i++) {
diff --git a/drivers/gpu/drm/radeon/r600_dma.c b/drivers/gpu/drm/radeon/r600_dma.c
index a908daa..cef647a 100644
--- a/drivers/gpu/drm/radeon/r600_dma.c
+++ b/drivers/gpu/drm/radeon/r600_dma.c
@@ -255,6 +255,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++) {
+		r600_mmio_hdp_flush(rdev);
 		tmp = readl(ptr);
 		if (tmp == 0xDEADBEEF)
 			break;