drm/amdgpu: use write confirm for vm_flush()
authorChristian König <christian.koenig@amd.com>
Sat, 5 Sep 2015 09:59:50 +0000 (11:59 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 23 Sep 2015 21:23:30 +0000 (17:23 -0400)
Make sure the CP waits for the write to be confirmed before
invalidating.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c

index 0f979abca2359fb0607b96966dcfc05f260f128d..d6d330bc6daa307915446b83408eb1c1bc82896d 100644 (file)
@@ -4059,7 +4059,8 @@ static void gfx_v8_0_ring_emit_vm_flush(struct amdgpu_ring *ring,
 
        amdgpu_ring_write(ring, PACKET3(PACKET3_WRITE_DATA, 3));
        amdgpu_ring_write(ring, (WRITE_DATA_ENGINE_SEL(usepfp) |
-                                WRITE_DATA_DST_SEL(0)));
+                                WRITE_DATA_DST_SEL(0)) |
+                                WR_CONFIRM);
        if (vm_id < 8) {
                amdgpu_ring_write(ring,
                                  (mmVM_CONTEXT0_PAGE_TABLE_BASE_ADDR + vm_id));