drm/radeon/kms: don't poll forever if MC GDDR link training fails

Bail if we hit the timeout limit.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Alex Deucher 2011-11-02 18:08:25 -04:00 committed by Dave Airlie
parent cf2aff6eff
commit 0e2c978ef2
1 changed files with 5 additions and 2 deletions

View File

@ -261,8 +261,11 @@ int ni_mc_load_microcode(struct radeon_device *rdev)
WREG32(MC_SEQ_SUP_CNTL, 0x00000001); WREG32(MC_SEQ_SUP_CNTL, 0x00000001);
/* wait for training to complete */ /* wait for training to complete */
while (!(RREG32(MC_IO_PAD_CNTL_D0) & MEM_FALL_OUT_CMD)) for (i = 0; i < rdev->usec_timeout; i++) {
udelay(10); if (RREG32(MC_IO_PAD_CNTL_D0) & MEM_FALL_OUT_CMD)
break;
udelay(1);
}
if (running) if (running)
WREG32(MC_SHARED_BLACKOUT_CNTL, blackout); WREG32(MC_SHARED_BLACKOUT_CNTL, blackout);