summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_asic.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2010-03-16 17:08:06 -0400
committerDave Airlie <airlied@redhat.com>2010-03-31 09:54:07 +1000
commit9e7b414edbf5e037c1462bbd8676465ed2ae0ac3 (patch)
treec843d452a884f3af803794dd4c85581ebd90e6df /drivers/gpu/drm/radeon/radeon_asic.c
parent06abdb0ec6b91f634631404012c4d646389e9e0b (diff)
downloadblackbird-obmc-linux-9e7b414edbf5e037c1462bbd8676465ed2ae0ac3.tar.gz
blackbird-obmc-linux-9e7b414edbf5e037c1462bbd8676465ed2ae0ac3.zip
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.c10
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)
rdev->asic->set_memory_clock = NULL;
}
+ /* set the number of crtcs */
+ if (rdev->flags & RADEON_SINGLE_CRTC)
+ rdev->num_crtc = 1;
+ else {
+ if (ASIC_IS_DCE4(rdev))
+ rdev->num_crtc = 6;
+ else
+ rdev->num_crtc = 2;
+ }
+
return 0;
}
OpenPOWER on IntegriCloud