diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2012-08-15 16:58:30 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2012-09-20 13:10:32 -0400 |
commit | 94f768fd7458e5e8372b8b7565b594284afb6b89 (patch) | |
tree | f4e6d2755f87cac887c5e37a574e9f9fe2f8e38d /drivers/gpu/drm/radeon/r100.c | |
parent | 46437057bd2a178b12d3a55bac06cbbd46eea4be (diff) |
drm/radeon/r1xx-r4xx: don't use radeon_crtc for vblank callback
This might be called before we've allocated the radeon_crtcs
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r100.c')
-rw-r--r-- | drivers/gpu/drm/radeon/r100.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c index 8d7e33a0b243..163c33e1a1d6 100644 --- a/drivers/gpu/drm/radeon/r100.c +++ b/drivers/gpu/drm/radeon/r100.c | |||
@@ -80,10 +80,12 @@ MODULE_FIRMWARE(FIRMWARE_R520); | |||
80 | */ | 80 | */ |
81 | void r100_wait_for_vblank(struct radeon_device *rdev, int crtc) | 81 | void r100_wait_for_vblank(struct radeon_device *rdev, int crtc) |
82 | { | 82 | { |
83 | struct radeon_crtc *radeon_crtc = rdev->mode_info.crtcs[crtc]; | ||
84 | int i; | 83 | int i; |
85 | 84 | ||
86 | if (radeon_crtc->crtc_id == 0) { | 85 | if (crtc >= rdev->num_crtc) |
86 | return; | ||
87 | |||
88 | if (crtc == 0) { | ||
87 | if (RREG32(RADEON_CRTC_GEN_CNTL) & RADEON_CRTC_EN) { | 89 | if (RREG32(RADEON_CRTC_GEN_CNTL) & RADEON_CRTC_EN) { |
88 | for (i = 0; i < rdev->usec_timeout; i++) { | 90 | for (i = 0; i < rdev->usec_timeout; i++) { |
89 | if (!(RREG32(RADEON_CRTC_STATUS) & RADEON_CRTC_VBLANK_CUR)) | 91 | if (!(RREG32(RADEON_CRTC_STATUS) & RADEON_CRTC_VBLANK_CUR)) |