Skip to content

Commit

Permalink
drm/radeon/kms: don't poll forever if MC GDDR link training fails
Browse files Browse the repository at this point in the history
Bail if we hit the timeout limit.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Alex Deucher authored and Dave Airlie committed Nov 3, 2011
1 parent cf2aff6 commit 0e2c978
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/gpu/drm/radeon/ni.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,11 @@ int ni_mc_load_microcode(struct radeon_device *rdev)
WREG32(MC_SEQ_SUP_CNTL, 0x00000001);

/* wait for training to complete */
while (!(RREG32(MC_IO_PAD_CNTL_D0) & MEM_FALL_OUT_CMD))
udelay(10);
for (i = 0; i < rdev->usec_timeout; i++) {
if (RREG32(MC_IO_PAD_CNTL_D0) & MEM_FALL_OUT_CMD)
break;
udelay(1);
}

if (running)
WREG32(MC_SHARED_BLACKOUT_CNTL, blackout);
Expand Down

0 comments on commit 0e2c978

Please sign in to comment.