diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2014-09-23 10:20:13 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2014-09-23 10:20:13 -0400 |
commit | 370ce45b5986118fa496dddbcd7039e1aa1a418f (patch) | |
tree | 4adc5875d9d71ffd57d2f8192523daf9ae6b4455 | |
parent | ff1b129403aad9a5c7cc9a6eaaffe4bd5fc0c67f (diff) |
drm/radeon/cik: use a separate counter for CP init timeout
Otherwise we may fail to init the second compute ring.
Noticed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
-rw-r--r-- | drivers/gpu/drm/radeon/cik.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c index 98dbaea21d08..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); |