diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2010-03-16 17:08:06 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-03-30 19:54:07 -0400 |
commit | 9e7b414edbf5e037c1462bbd8676465ed2ae0ac3 (patch) | |
tree | c843d452a884f3af803794dd4c85581ebd90e6df /drivers/gpu/drm/radeon/radeon_asic.c | |
parent | 06abdb0ec6b91f634631404012c4d646389e9e0b (diff) |
drm/radeon/kms: init rdev->num_crtc at asic init
Replace hardcoded numbers with rdev->num_crtc.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_asic.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_asic.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c index 6d2a5457c2c8..dd23dcfbde17 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.c +++ b/drivers/gpu/drm/radeon/radeon_asic.c | |||
@@ -700,6 +700,16 @@ int radeon_asic_init(struct radeon_device *rdev) | |||
700 | rdev->asic->set_memory_clock = NULL; | 700 | rdev->asic->set_memory_clock = NULL; |
701 | } | 701 | } |
702 | 702 | ||
703 | /* set the number of crtcs */ | ||
704 | if (rdev->flags & RADEON_SINGLE_CRTC) | ||
705 | rdev->num_crtc = 1; | ||
706 | else { | ||
707 | if (ASIC_IS_DCE4(rdev)) | ||
708 | rdev->num_crtc = 6; | ||
709 | else | ||
710 | rdev->num_crtc = 2; | ||
711 | } | ||
712 | |||
703 | return 0; | 713 | return 0; |
704 | } | 714 | } |
705 | 715 | ||