diff options
author | Paul Mackerras <paulus@samba.org> | 2007-05-07 23:37:51 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-05-07 23:37:51 -0400 |
commit | 02bbc0f09c90cefdb2837605c96a66c5ce4ba2e1 (patch) | |
tree | 04ef573cd4de095c500c9fc3477f4278c0b36300 /drivers/char/drm/radeon_cp.c | |
parent | 7487a2245b8841c77ba9db406cf99a483b9334e9 (diff) | |
parent | 5b94f675f57e4ff16c8fda09088d7480a84dcd91 (diff) |
Merge branch 'linux-2.6'
Diffstat (limited to 'drivers/char/drm/radeon_cp.c')
-rw-r--r-- | drivers/char/drm/radeon_cp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/char/drm/radeon_cp.c b/drivers/char/drm/radeon_cp.c index 5ed965688293..c1850ecac302 100644 --- a/drivers/char/drm/radeon_cp.c +++ b/drivers/char/drm/radeon_cp.c | |||
@@ -1560,8 +1560,8 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init) | |||
1560 | if (dev_priv->flags & RADEON_IS_AGP) { | 1560 | if (dev_priv->flags & RADEON_IS_AGP) { |
1561 | base = dev->agp->base; | 1561 | base = dev->agp->base; |
1562 | /* Check if valid */ | 1562 | /* Check if valid */ |
1563 | if ((base + dev_priv->gart_size) > dev_priv->fb_location && | 1563 | if ((base + dev_priv->gart_size - 1) >= dev_priv->fb_location && |
1564 | base < (dev_priv->fb_location + dev_priv->fb_size)) { | 1564 | base < (dev_priv->fb_location + dev_priv->fb_size - 1)) { |
1565 | DRM_INFO("Can't use AGP base @0x%08lx, won't fit\n", | 1565 | DRM_INFO("Can't use AGP base @0x%08lx, won't fit\n", |
1566 | dev->agp->base); | 1566 | dev->agp->base); |
1567 | base = 0; | 1567 | base = 0; |
@@ -1571,8 +1571,8 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init) | |||
1571 | /* If not or if AGP is at 0 (Macs), try to put it elsewhere */ | 1571 | /* If not or if AGP is at 0 (Macs), try to put it elsewhere */ |
1572 | if (base == 0) { | 1572 | if (base == 0) { |
1573 | base = dev_priv->fb_location + dev_priv->fb_size; | 1573 | base = dev_priv->fb_location + dev_priv->fb_size; |
1574 | if (((base + dev_priv->gart_size) & 0xfffffffful) | 1574 | if (base < dev_priv->fb_location || |
1575 | < base) | 1575 | ((base + dev_priv->gart_size) & 0xfffffffful) < base) |
1576 | base = dev_priv->fb_location | 1576 | base = dev_priv->fb_location |
1577 | - dev_priv->gart_size; | 1577 | - dev_priv->gart_size; |
1578 | } | 1578 | } |