diff options
author | Chunming Zhou <David1.Zhou@amd.com> | 2016-03-02 23:06:34 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-03-08 11:01:43 -0500 |
commit | 6ad550c35d8c5327a548bc59bba406ef2db51f1b (patch) | |
tree | 8bf50a760f3dc57206c087612899e209a38719db | |
parent | 498dd97ddbc47fdb8a5e3bf4df8a77893b8b07a2 (diff) |
drm/amdgpu: add hdp invalidation for sdma v2_4
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_v2_4.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c index 0e246ff6734c..134d5d0bb77f 100644 --- a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | |||
@@ -300,6 +300,13 @@ static void sdma_v2_4_ring_emit_hdp_flush(struct amdgpu_ring *ring) | |||
300 | SDMA_PKT_POLL_REGMEM_DW5_INTERVAL(10)); /* retry count, poll interval */ | 300 | SDMA_PKT_POLL_REGMEM_DW5_INTERVAL(10)); /* retry count, poll interval */ |
301 | } | 301 | } |
302 | 302 | ||
303 | static void sdma_v2_4_ring_emit_hdp_invalidate(struct amdgpu_ring *ring) | ||
304 | { | ||
305 | amdgpu_ring_write(ring, SDMA_PKT_HEADER_OP(SDMA_OP_SRBM_WRITE) | | ||
306 | SDMA_PKT_SRBM_WRITE_HEADER_BYTE_EN(0xf)); | ||
307 | amdgpu_ring_write(ring, mmHDP_DEBUG0); | ||
308 | amdgpu_ring_write(ring, 1); | ||
309 | } | ||
303 | /** | 310 | /** |
304 | * sdma_v2_4_ring_emit_fence - emit a fence on the DMA ring | 311 | * sdma_v2_4_ring_emit_fence - emit a fence on the DMA ring |
305 | * | 312 | * |
@@ -1291,6 +1298,7 @@ static const struct amdgpu_ring_funcs sdma_v2_4_ring_funcs = { | |||
1291 | .emit_fence = sdma_v2_4_ring_emit_fence, | 1298 | .emit_fence = sdma_v2_4_ring_emit_fence, |
1292 | .emit_vm_flush = sdma_v2_4_ring_emit_vm_flush, | 1299 | .emit_vm_flush = sdma_v2_4_ring_emit_vm_flush, |
1293 | .emit_hdp_flush = sdma_v2_4_ring_emit_hdp_flush, | 1300 | .emit_hdp_flush = sdma_v2_4_ring_emit_hdp_flush, |
1301 | .emit_hdp_invalidate = sdma_v2_4_ring_emit_hdp_invalidate, | ||
1294 | .test_ring = sdma_v2_4_ring_test_ring, | 1302 | .test_ring = sdma_v2_4_ring_test_ring, |
1295 | .test_ib = sdma_v2_4_ring_test_ib, | 1303 | .test_ib = sdma_v2_4_ring_test_ib, |
1296 | .insert_nop = sdma_v2_4_ring_insert_nop, | 1304 | .insert_nop = sdma_v2_4_ring_insert_nop, |