aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChunming Zhou <David1.Zhou@amd.com>2016-03-02 23:06:45 -0500
committerAlex Deucher <alexander.deucher@amd.com>2016-03-08 11:01:44 -0500
commitcc958e67aa47372e8e1e875c653cd9328f215cb4 (patch)
treeba137d525fd35c1f45ac8ffbe7c27bc39654b851
parent6ad550c35d8c5327a548bc59bba406ef2db51f1b (diff)
drm/amdgpu: add hdp invalidation for sdma v3_0
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
index 67441f8844bb..ca12d6faa8c2 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
@@ -410,6 +410,14 @@ static void sdma_v3_0_ring_emit_hdp_flush(struct amdgpu_ring *ring)
410 SDMA_PKT_POLL_REGMEM_DW5_INTERVAL(10)); /* retry count, poll interval */ 410 SDMA_PKT_POLL_REGMEM_DW5_INTERVAL(10)); /* retry count, poll interval */
411} 411}
412 412
413static void sdma_v3_0_ring_emit_hdp_invalidate(struct amdgpu_ring *ring)
414{
415 amdgpu_ring_write(ring, SDMA_PKT_HEADER_OP(SDMA_OP_SRBM_WRITE) |
416 SDMA_PKT_SRBM_WRITE_HEADER_BYTE_EN(0xf));
417 amdgpu_ring_write(ring, mmHDP_DEBUG0);
418 amdgpu_ring_write(ring, 1);
419}
420
413/** 421/**
414 * sdma_v3_0_ring_emit_fence - emit a fence on the DMA ring 422 * sdma_v3_0_ring_emit_fence - emit a fence on the DMA ring
415 * 423 *
@@ -1558,6 +1566,7 @@ static const struct amdgpu_ring_funcs sdma_v3_0_ring_funcs = {
1558 .emit_fence = sdma_v3_0_ring_emit_fence, 1566 .emit_fence = sdma_v3_0_ring_emit_fence,
1559 .emit_vm_flush = sdma_v3_0_ring_emit_vm_flush, 1567 .emit_vm_flush = sdma_v3_0_ring_emit_vm_flush,
1560 .emit_hdp_flush = sdma_v3_0_ring_emit_hdp_flush, 1568 .emit_hdp_flush = sdma_v3_0_ring_emit_hdp_flush,
1569 .emit_hdp_invalidate = sdma_v3_0_ring_emit_hdp_invalidate,
1561 .test_ring = sdma_v3_0_ring_test_ring, 1570 .test_ring = sdma_v3_0_ring_test_ring,
1562 .test_ib = sdma_v3_0_ring_test_ib, 1571 .test_ib = sdma_v3_0_ring_test_ib,
1563 .insert_nop = sdma_v3_0_ring_insert_nop, 1572 .insert_nop = sdma_v3_0_ring_insert_nop,