diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/r600.c')
-rw-r--r-- | drivers/gpu/drm/radeon/r600.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index e616eb5f6e7a..ea5c9af722ef 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
@@ -2769,8 +2769,8 @@ bool r600_semaphore_ring_emit(struct radeon_device *rdev, | |||
2769 | radeon_ring_write(ring, lower_32_bits(addr)); | 2769 | radeon_ring_write(ring, lower_32_bits(addr)); |
2770 | radeon_ring_write(ring, (upper_32_bits(addr) & 0xff) | sel); | 2770 | radeon_ring_write(ring, (upper_32_bits(addr) & 0xff) | sel); |
2771 | 2771 | ||
2772 | /* PFP_SYNC_ME packet only exists on 7xx+ */ | 2772 | /* PFP_SYNC_ME packet only exists on 7xx+, only enable it on eg+ */ |
2773 | if (emit_wait && (rdev->family >= CHIP_RV770)) { | 2773 | if (emit_wait && (rdev->family >= CHIP_CEDAR)) { |
2774 | /* Prevent the PFP from running ahead of the semaphore wait */ | 2774 | /* Prevent the PFP from running ahead of the semaphore wait */ |
2775 | radeon_ring_write(ring, PACKET3(PACKET3_PFP_SYNC_ME, 0)); | 2775 | radeon_ring_write(ring, PACKET3(PACKET3_PFP_SYNC_ME, 0)); |
2776 | radeon_ring_write(ring, 0x0); | 2776 | radeon_ring_write(ring, 0x0); |
@@ -3792,17 +3792,17 @@ static u32 r600_get_ih_wptr(struct radeon_device *rdev) | |||
3792 | wptr = RREG32(IH_RB_WPTR); | 3792 | wptr = RREG32(IH_RB_WPTR); |
3793 | 3793 | ||
3794 | if (wptr & RB_OVERFLOW) { | 3794 | if (wptr & RB_OVERFLOW) { |
3795 | wptr &= ~RB_OVERFLOW; | ||
3795 | /* When a ring buffer overflow happen start parsing interrupt | 3796 | /* When a ring buffer overflow happen start parsing interrupt |
3796 | * from the last not overwritten vector (wptr + 16). Hopefully | 3797 | * from the last not overwritten vector (wptr + 16). Hopefully |
3797 | * this should allow us to catchup. | 3798 | * this should allow us to catchup. |
3798 | */ | 3799 | */ |
3799 | dev_warn(rdev->dev, "IH ring buffer overflow (0x%08X, %d, %d)\n", | 3800 | dev_warn(rdev->dev, "IH ring buffer overflow (0x%08X, 0x%08X, 0x%08X)\n", |
3800 | wptr, rdev->ih.rptr, (wptr + 16) + rdev->ih.ptr_mask); | 3801 | wptr, rdev->ih.rptr, (wptr + 16) & rdev->ih.ptr_mask); |
3801 | rdev->ih.rptr = (wptr + 16) & rdev->ih.ptr_mask; | 3802 | rdev->ih.rptr = (wptr + 16) & rdev->ih.ptr_mask; |
3802 | tmp = RREG32(IH_RB_CNTL); | 3803 | tmp = RREG32(IH_RB_CNTL); |
3803 | tmp |= IH_WPTR_OVERFLOW_CLEAR; | 3804 | tmp |= IH_WPTR_OVERFLOW_CLEAR; |
3804 | WREG32(IH_RB_CNTL, tmp); | 3805 | WREG32(IH_RB_CNTL, tmp); |
3805 | wptr &= ~RB_OVERFLOW; | ||
3806 | } | 3806 | } |
3807 | return (wptr & rdev->ih.ptr_mask); | 3807 | return (wptr & rdev->ih.ptr_mask); |
3808 | } | 3808 | } |
@@ -4048,6 +4048,7 @@ restart_ih: | |||
4048 | /* wptr/rptr are in bytes! */ | 4048 | /* wptr/rptr are in bytes! */ |
4049 | rptr += 16; | 4049 | rptr += 16; |
4050 | rptr &= rdev->ih.ptr_mask; | 4050 | rptr &= rdev->ih.ptr_mask; |
4051 | WREG32(IH_RB_RPTR, rptr); | ||
4051 | } | 4052 | } |
4052 | if (queue_hotplug) | 4053 | if (queue_hotplug) |
4053 | schedule_work(&rdev->hotplug_work); | 4054 | schedule_work(&rdev->hotplug_work); |
@@ -4056,7 +4057,6 @@ restart_ih: | |||
4056 | if (queue_thermal && rdev->pm.dpm_enabled) | 4057 | if (queue_thermal && rdev->pm.dpm_enabled) |
4057 | schedule_work(&rdev->pm.dpm.thermal.work); | 4058 | schedule_work(&rdev->pm.dpm.thermal.work); |
4058 | rdev->ih.rptr = rptr; | 4059 | rdev->ih.rptr = rptr; |
4059 | WREG32(IH_RB_RPTR, rdev->ih.rptr); | ||
4060 | atomic_set(&rdev->ih.lock, 0); | 4060 | atomic_set(&rdev->ih.lock, 0); |
4061 | 4061 | ||
4062 | /* make sure wptr hasn't changed while processing */ | 4062 | /* make sure wptr hasn't changed while processing */ |