Commit e29ff729 authored by Alex Deucher's avatar Alex Deucher Committed by Dave Airlie

drm/radeon/kms: fix bug in r600_gpu_is_lockup

We were using the lockup struct from the wrong union.
Signed-off-by: default avatarAlex Deucher <alexdeucher@gmail.com>
Cc: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent a93f344d
...@@ -1342,13 +1342,19 @@ bool r600_gpu_is_lockup(struct radeon_device *rdev) ...@@ -1342,13 +1342,19 @@ bool r600_gpu_is_lockup(struct radeon_device *rdev)
u32 srbm_status; u32 srbm_status;
u32 grbm_status; u32 grbm_status;
u32 grbm_status2; u32 grbm_status2;
struct r100_gpu_lockup *lockup;
int r; int r;
if (rdev->family >= CHIP_RV770)
lockup = &rdev->config.rv770.lockup;
else
lockup = &rdev->config.r600.lockup;
srbm_status = RREG32(R_000E50_SRBM_STATUS); srbm_status = RREG32(R_000E50_SRBM_STATUS);
grbm_status = RREG32(R_008010_GRBM_STATUS); grbm_status = RREG32(R_008010_GRBM_STATUS);
grbm_status2 = RREG32(R_008014_GRBM_STATUS2); grbm_status2 = RREG32(R_008014_GRBM_STATUS2);
if (!G_008010_GUI_ACTIVE(grbm_status)) { if (!G_008010_GUI_ACTIVE(grbm_status)) {
r100_gpu_lockup_update(&rdev->config.r300.lockup, &rdev->cp); r100_gpu_lockup_update(lockup, &rdev->cp);
return false; return false;
} }
/* force CP activities */ /* force CP activities */
...@@ -1360,7 +1366,7 @@ bool r600_gpu_is_lockup(struct radeon_device *rdev) ...@@ -1360,7 +1366,7 @@ bool r600_gpu_is_lockup(struct radeon_device *rdev)
radeon_ring_unlock_commit(rdev); radeon_ring_unlock_commit(rdev);
} }
rdev->cp.rptr = RREG32(R600_CP_RB_RPTR); rdev->cp.rptr = RREG32(R600_CP_RB_RPTR);
return r100_gpu_cp_is_lockup(rdev, &rdev->config.r300.lockup, &rdev->cp); return r100_gpu_cp_is_lockup(rdev, lockup, &rdev->cp);
} }
int r600_asic_reset(struct radeon_device *rdev) int r600_asic_reset(struct radeon_device *rdev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment