Skip to content

Commit

Permalink
drm/radeon/kms: Disable AGP is aperture size < 32M
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jerome Glisse authored and Dave Airlie committed Jan 14, 2010
1 parent 30d2d9a commit 0a3f316
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/gpu/drm/radeon/radeon_agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ int radeon_agp_init(struct radeon_device *rdev)
bool is_v3;
int ret;

if (rdev->ddev->agp->agp_info.aper_size < 32) {
dev_warn(rdev->dev, "AGP aperture to small (%dM) "
"need at least 32M, disabling AGP\n",
rdev->ddev->agp->agp_info.aper_size);
return -EINVAL;
}

/* Acquire AGP. */
if (!rdev->ddev->agp->acquired) {
ret = drm_agp_acquire(rdev->ddev);
Expand Down

0 comments on commit 0a3f316

Please sign in to comment.