diff options
-rw-r--r-- | drivers/gpu/drm/radeon/ni.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/nid.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/si.c | 4 |
3 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index 8c74c729586..19b7fe1248b 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c | |||
@@ -1586,4 +1586,8 @@ void cayman_vm_flush(struct radeon_device *rdev, int ridx, struct radeon_vm *vm) | |||
1586 | /* bits 0-7 are the VM contexts0-7 */ | 1586 | /* bits 0-7 are the VM contexts0-7 */ |
1587 | radeon_ring_write(ring, PACKET0(VM_INVALIDATE_REQUEST, 0)); | 1587 | radeon_ring_write(ring, PACKET0(VM_INVALIDATE_REQUEST, 0)); |
1588 | radeon_ring_write(ring, 1 << vm->id); | 1588 | radeon_ring_write(ring, 1 << vm->id); |
1589 | |||
1590 | /* sync PFP to ME, otherwise we might get invalid PFP reads */ | ||
1591 | radeon_ring_write(ring, PACKET3(PACKET3_PFP_SYNC_ME, 0)); | ||
1592 | radeon_ring_write(ring, 0x0); | ||
1589 | } | 1593 | } |
diff --git a/drivers/gpu/drm/radeon/nid.h b/drivers/gpu/drm/radeon/nid.h index 2423d1b5d38..cbef6815907 100644 --- a/drivers/gpu/drm/radeon/nid.h +++ b/drivers/gpu/drm/radeon/nid.h | |||
@@ -502,6 +502,7 @@ | |||
502 | #define PACKET3_MPEG_INDEX 0x3A | 502 | #define PACKET3_MPEG_INDEX 0x3A |
503 | #define PACKET3_WAIT_REG_MEM 0x3C | 503 | #define PACKET3_WAIT_REG_MEM 0x3C |
504 | #define PACKET3_MEM_WRITE 0x3D | 504 | #define PACKET3_MEM_WRITE 0x3D |
505 | #define PACKET3_PFP_SYNC_ME 0x42 | ||
505 | #define PACKET3_SURFACE_SYNC 0x43 | 506 | #define PACKET3_SURFACE_SYNC 0x43 |
506 | # define PACKET3_CB0_DEST_BASE_ENA (1 << 6) | 507 | # define PACKET3_CB0_DEST_BASE_ENA (1 << 6) |
507 | # define PACKET3_CB1_DEST_BASE_ENA (1 << 7) | 508 | # define PACKET3_CB1_DEST_BASE_ENA (1 << 7) |
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c index df8dd770164..da184de021b 100644 --- a/drivers/gpu/drm/radeon/si.c +++ b/drivers/gpu/drm/radeon/si.c | |||
@@ -2868,6 +2868,10 @@ void si_vm_flush(struct radeon_device *rdev, int ridx, struct radeon_vm *vm) | |||
2868 | radeon_ring_write(ring, VM_INVALIDATE_REQUEST >> 2); | 2868 | radeon_ring_write(ring, VM_INVALIDATE_REQUEST >> 2); |
2869 | radeon_ring_write(ring, 0); | 2869 | radeon_ring_write(ring, 0); |
2870 | radeon_ring_write(ring, 1 << vm->id); | 2870 | radeon_ring_write(ring, 1 << vm->id); |
2871 | |||
2872 | /* sync PFP to ME, otherwise we might get invalid PFP reads */ | ||
2873 | radeon_ring_write(ring, PACKET3(PACKET3_PFP_SYNC_ME, 0)); | ||
2874 | radeon_ring_write(ring, 0x0); | ||
2871 | } | 2875 | } |
2872 | 2876 | ||
2873 | /* | 2877 | /* |