drm/amdgpu: add hdp invalidation for cik sdma
authorChunming Zhou <David1.Zhou@amd.com>
Thu, 3 Mar 2016 04:05:44 +0000 (12:05 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 8 Mar 2016 16:01:42 +0000 (11:01 -0500)
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>
drivers/gpu/drm/amd/amdgpu/cik_sdma.c

index 6cf45b0ff91b4eda1d70b88ea5c9354491ebb35d..c4101ebd2b3f20f4a2763d648a96aae16d63b014 100644 (file)
@@ -261,6 +261,13 @@ static void cik_sdma_ring_emit_hdp_flush(struct amdgpu_ring *ring)
        amdgpu_ring_write(ring, (0xfff << 16) | 10); /* retry count, poll interval */
 }
 
+static void cik_sdma_ring_emit_hdp_invalidate(struct amdgpu_ring *ring)
+{
+       amdgpu_ring_write(ring, SDMA_PACKET(SDMA_OPCODE_SRBM_WRITE, 0, 0xf000));
+       amdgpu_ring_write(ring, mmHDP_DEBUG0);
+       amdgpu_ring_write(ring, 1);
+}
+
 /**
  * cik_sdma_ring_emit_fence - emit a fence on the DMA ring
  *
@@ -1286,6 +1293,7 @@ static const struct amdgpu_ring_funcs cik_sdma_ring_funcs = {
        .emit_fence = cik_sdma_ring_emit_fence,
        .emit_vm_flush = cik_sdma_ring_emit_vm_flush,
        .emit_hdp_flush = cik_sdma_ring_emit_hdp_flush,
+       .emit_hdp_invalidate = cik_sdma_ring_emit_hdp_invalidate,
        .test_ring = cik_sdma_ring_test_ring,
        .test_ib = cik_sdma_ring_test_ib,
        .insert_nop = cik_sdma_ring_insert_nop,