diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-10-11 14:34:07 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-10-11 14:34:07 -0400 |
commit | 9d93551188069a0a21e664b4bfc89ed4a6df1903 (patch) | |
tree | bcf7334c0e57323a6844b8147ce1c92180fe8cef /drivers/gpu/drm/radeon/cik.c | |
parent | dd4cae8bf16611053ee7b00e20aa4fa945b92b99 (diff) | |
parent | bfe01a5ba2490f299e1d2d5508cbbbadd897bbe9 (diff) |
Merge tag 'v3.17' into next
Synchronize with mainline to bring in changes to Synaptics and i8042
drivers.
Diffstat (limited to 'drivers/gpu/drm/radeon/cik.c')
-rw-r--r-- | drivers/gpu/drm/radeon/cik.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c index fa9565957f9d..3d546c606b43 100644 --- a/drivers/gpu/drm/radeon/cik.c +++ b/drivers/gpu/drm/radeon/cik.c | |||
@@ -4803,7 +4803,7 @@ struct bonaire_mqd | |||
4803 | */ | 4803 | */ |
4804 | static int cik_cp_compute_resume(struct radeon_device *rdev) | 4804 | static int cik_cp_compute_resume(struct radeon_device *rdev) |
4805 | { | 4805 | { |
4806 | int r, i, idx; | 4806 | int r, i, j, idx; |
4807 | u32 tmp; | 4807 | u32 tmp; |
4808 | bool use_doorbell = true; | 4808 | bool use_doorbell = true; |
4809 | u64 hqd_gpu_addr; | 4809 | u64 hqd_gpu_addr; |
@@ -4922,7 +4922,7 @@ static int cik_cp_compute_resume(struct radeon_device *rdev) | |||
4922 | mqd->queue_state.cp_hqd_pq_wptr= 0; | 4922 | mqd->queue_state.cp_hqd_pq_wptr= 0; |
4923 | if (RREG32(CP_HQD_ACTIVE) & 1) { | 4923 | if (RREG32(CP_HQD_ACTIVE) & 1) { |
4924 | WREG32(CP_HQD_DEQUEUE_REQUEST, 1); | 4924 | WREG32(CP_HQD_DEQUEUE_REQUEST, 1); |
4925 | for (i = 0; i < rdev->usec_timeout; i++) { | 4925 | for (j = 0; j < rdev->usec_timeout; j++) { |
4926 | if (!(RREG32(CP_HQD_ACTIVE) & 1)) | 4926 | if (!(RREG32(CP_HQD_ACTIVE) & 1)) |
4927 | break; | 4927 | break; |
4928 | udelay(1); | 4928 | udelay(1); |
@@ -7751,17 +7751,17 @@ static inline u32 cik_get_ih_wptr(struct radeon_device *rdev) | |||
7751 | wptr = RREG32(IH_RB_WPTR); | 7751 | wptr = RREG32(IH_RB_WPTR); |
7752 | 7752 | ||
7753 | if (wptr & RB_OVERFLOW) { | 7753 | if (wptr & RB_OVERFLOW) { |
7754 | wptr &= ~RB_OVERFLOW; | ||
7754 | /* When a ring buffer overflow happen start parsing interrupt | 7755 | /* When a ring buffer overflow happen start parsing interrupt |
7755 | * from the last not overwritten vector (wptr + 16). Hopefully | 7756 | * from the last not overwritten vector (wptr + 16). Hopefully |
7756 | * this should allow us to catchup. | 7757 | * this should allow us to catchup. |
7757 | */ | 7758 | */ |
7758 | dev_warn(rdev->dev, "IH ring buffer overflow (0x%08X, %d, %d)\n", | 7759 | dev_warn(rdev->dev, "IH ring buffer overflow (0x%08X, 0x%08X, 0x%08X)\n", |
7759 | wptr, rdev->ih.rptr, (wptr + 16) + rdev->ih.ptr_mask); | 7760 | wptr, rdev->ih.rptr, (wptr + 16) & rdev->ih.ptr_mask); |
7760 | rdev->ih.rptr = (wptr + 16) & rdev->ih.ptr_mask; | 7761 | rdev->ih.rptr = (wptr + 16) & rdev->ih.ptr_mask; |
7761 | tmp = RREG32(IH_RB_CNTL); | 7762 | tmp = RREG32(IH_RB_CNTL); |
7762 | tmp |= IH_WPTR_OVERFLOW_CLEAR; | 7763 | tmp |= IH_WPTR_OVERFLOW_CLEAR; |
7763 | WREG32(IH_RB_CNTL, tmp); | 7764 | WREG32(IH_RB_CNTL, tmp); |
7764 | wptr &= ~RB_OVERFLOW; | ||
7765 | } | 7765 | } |
7766 | return (wptr & rdev->ih.ptr_mask); | 7766 | return (wptr & rdev->ih.ptr_mask); |
7767 | } | 7767 | } |
@@ -8251,6 +8251,7 @@ restart_ih: | |||
8251 | /* wptr/rptr are in bytes! */ | 8251 | /* wptr/rptr are in bytes! */ |
8252 | rptr += 16; | 8252 | rptr += 16; |
8253 | rptr &= rdev->ih.ptr_mask; | 8253 | rptr &= rdev->ih.ptr_mask; |
8254 | WREG32(IH_RB_RPTR, rptr); | ||
8254 | } | 8255 | } |
8255 | if (queue_hotplug) | 8256 | if (queue_hotplug) |
8256 | schedule_work(&rdev->hotplug_work); | 8257 | schedule_work(&rdev->hotplug_work); |
@@ -8259,7 +8260,6 @@ restart_ih: | |||
8259 | if (queue_thermal) | 8260 | if (queue_thermal) |
8260 | schedule_work(&rdev->pm.dpm.thermal.work); | 8261 | schedule_work(&rdev->pm.dpm.thermal.work); |
8261 | rdev->ih.rptr = rptr; | 8262 | rdev->ih.rptr = rptr; |
8262 | WREG32(IH_RB_RPTR, rdev->ih.rptr); | ||
8263 | atomic_set(&rdev->ih.lock, 0); | 8263 | atomic_set(&rdev->ih.lock, 0); |
8264 | 8264 | ||
8265 | /* make sure wptr hasn't changed while processing */ | 8265 | /* make sure wptr hasn't changed while processing */ |