aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChunming Zhou <David1.Zhou@amd.com>2016-03-02 22:46:40 -0500
committerAlex Deucher <alexander.deucher@amd.com>2016-03-08 11:01:41 -0500
commit0955860b87183d4bf506eb861760ea178de027bf (patch)
treedf3feed63eb4752ef62678aed3c27bf933b3a9ec
parent11afbde85eeba1ccb0a459c49444aaf9032e9755 (diff)
drm/amdgpu: add hdp invalidation for gfx7
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/gfx_v7_0.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
index 8fb7ebf3be3e..1b713009c5d2 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
@@ -1925,6 +1925,25 @@ static void gfx_v7_0_ring_emit_hdp_flush(struct amdgpu_ring *ring)
1925} 1925}
1926 1926
1927/** 1927/**
1928 * gfx_v7_0_ring_emit_hdp_invalidate - emit an hdp invalidate on the cp
1929 *
1930 * @adev: amdgpu_device pointer
1931 * @ridx: amdgpu ring index
1932 *
1933 * Emits an hdp invalidate on the cp.
1934 */
1935static void gfx_v7_0_ring_emit_hdp_invalidate(struct amdgpu_ring *ring)
1936{
1937 amdgpu_ring_write(ring, PACKET3(PACKET3_WRITE_DATA, 3));
1938 amdgpu_ring_write(ring, (WRITE_DATA_ENGINE_SEL(0) |
1939 WRITE_DATA_DST_SEL(0) |
1940 WR_CONFIRM));
1941 amdgpu_ring_write(ring, mmHDP_DEBUG0);
1942 amdgpu_ring_write(ring, 0);
1943 amdgpu_ring_write(ring, 1);
1944}
1945
1946/**
1928 * gfx_v7_0_ring_emit_fence_gfx - emit a fence on the gfx ring 1947 * gfx_v7_0_ring_emit_fence_gfx - emit a fence on the gfx ring
1929 * 1948 *
1930 * @adev: amdgpu_device pointer 1949 * @adev: amdgpu_device pointer
@@ -5132,6 +5151,7 @@ static const struct amdgpu_ring_funcs gfx_v7_0_ring_funcs_gfx = {
5132 .emit_vm_flush = gfx_v7_0_ring_emit_vm_flush, 5151 .emit_vm_flush = gfx_v7_0_ring_emit_vm_flush,
5133 .emit_gds_switch = gfx_v7_0_ring_emit_gds_switch, 5152 .emit_gds_switch = gfx_v7_0_ring_emit_gds_switch,
5134 .emit_hdp_flush = gfx_v7_0_ring_emit_hdp_flush, 5153 .emit_hdp_flush = gfx_v7_0_ring_emit_hdp_flush,
5154 .emit_hdp_invalidate = gfx_v7_0_ring_emit_hdp_invalidate,
5135 .test_ring = gfx_v7_0_ring_test_ring, 5155 .test_ring = gfx_v7_0_ring_test_ring,
5136 .test_ib = gfx_v7_0_ring_test_ib, 5156 .test_ib = gfx_v7_0_ring_test_ib,
5137 .insert_nop = amdgpu_ring_insert_nop, 5157 .insert_nop = amdgpu_ring_insert_nop,
@@ -5148,6 +5168,7 @@ static const struct amdgpu_ring_funcs gfx_v7_0_ring_funcs_compute = {
5148 .emit_vm_flush = gfx_v7_0_ring_emit_vm_flush, 5168 .emit_vm_flush = gfx_v7_0_ring_emit_vm_flush,
5149 .emit_gds_switch = gfx_v7_0_ring_emit_gds_switch, 5169 .emit_gds_switch = gfx_v7_0_ring_emit_gds_switch,
5150 .emit_hdp_flush = gfx_v7_0_ring_emit_hdp_flush, 5170 .emit_hdp_flush = gfx_v7_0_ring_emit_hdp_flush,
5171 .emit_hdp_invalidate = gfx_v7_0_ring_emit_hdp_invalidate,
5151 .test_ring = gfx_v7_0_ring_test_ring, 5172 .test_ring = gfx_v7_0_ring_test_ring,
5152 .test_ib = gfx_v7_0_ring_test_ib, 5173 .test_ib = gfx_v7_0_ring_test_ib,
5153 .insert_nop = amdgpu_ring_insert_nop, 5174 .insert_nop = amdgpu_ring_insert_nop,