aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2010-01-13 09:16:39 -0500
committerDave Airlie <airlied@redhat.com>2010-01-13 20:53:45 -0500
commit0a3f316370da07fcdb11fde4f5a683d60713b7fd (patch)
tree8b1fc890b7ee33f618ffa969156f26020e4c88a2 /drivers
parent30d2d9a54d48e4fefede0389ded1b6fc2d44a522 (diff)
drm/radeon/kms: Disable AGP is aperture size < 32M
radeon KMS need a GART of at least 32M to properly work. This patch check the AGP aperture size and disable if it's less than 32M. Note than unlike non KMS path we don't staticaly allocate AGP memory so we are not wasting memory not used by graphic processing. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/radeon/radeon_agp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_agp.c b/drivers/gpu/drm/radeon/radeon_agp.c
index 220f454ea9fa..c9ad7f5cc1ac 100644
--- a/drivers/gpu/drm/radeon/radeon_agp.c
+++ b/drivers/gpu/drm/radeon/radeon_agp.c
@@ -133,6 +133,13 @@ int radeon_agp_init(struct radeon_device *rdev)
133 bool is_v3; 133 bool is_v3;
134 int ret; 134 int ret;
135 135
136 if (rdev->ddev->agp->agp_info.aper_size < 32) {
137 dev_warn(rdev->dev, "AGP aperture to small (%dM) "
138 "need at least 32M, disabling AGP\n",
139 rdev->ddev->agp->agp_info.aper_size);
140 return -EINVAL;
141 }
142
136 /* Acquire AGP. */ 143 /* Acquire AGP. */
137 if (!rdev->ddev->agp->acquired) { 144 if (!rdev->ddev->agp->acquired) {
138 ret = drm_agp_acquire(rdev->ddev); 145 ret = drm_agp_acquire(rdev->ddev);