diff options
author | Dave Airlie <airlied@linux.ie> | 2007-11-04 19:45:27 -0500 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2007-11-04 19:49:04 -0500 |
commit | 7fc86860cf73e060ab8ed9763010dfe5b5389b1c (patch) | |
tree | ccff8d34a2307779d96320158c607ddbd56a2647 /drivers/char/drm/radeon_cp.c | |
parent | 5da0c7aad6271dd29526e3b49cbeb3bab9e8e491 (diff) |
radeon: set the address to access the GART table on the CPU side correctly
This code relied on the CPU and GPU address for the aperture being the same,
On some r5xx hardware I was playing with I noticed that this isn't always true.
This fixes issues seen on some r400 cards. (bugs.freedesktop.org 9957)
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/char/drm/radeon_cp.c')
-rw-r--r-- | drivers/char/drm/radeon_cp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/char/drm/radeon_cp.c b/drivers/char/drm/radeon_cp.c index 335423c5c186..24fca8ec1379 100644 --- a/drivers/char/drm/radeon_cp.c +++ b/drivers/char/drm/radeon_cp.c | |||
@@ -1679,7 +1679,7 @@ static int radeon_do_init_cp(struct drm_device * dev, drm_radeon_init_t * init) | |||
1679 | dev_priv->gart_info.bus_addr = | 1679 | dev_priv->gart_info.bus_addr = |
1680 | dev_priv->pcigart_offset + dev_priv->fb_location; | 1680 | dev_priv->pcigart_offset + dev_priv->fb_location; |
1681 | dev_priv->gart_info.mapping.offset = | 1681 | dev_priv->gart_info.mapping.offset = |
1682 | dev_priv->gart_info.bus_addr; | 1682 | dev_priv->pcigart_offset + dev_priv->fb_aper_offset; |
1683 | dev_priv->gart_info.mapping.size = | 1683 | dev_priv->gart_info.mapping.size = |
1684 | dev_priv->gart_info.table_size; | 1684 | dev_priv->gart_info.table_size; |
1685 | 1685 | ||
@@ -2275,7 +2275,8 @@ int radeon_driver_firstopen(struct drm_device *dev) | |||
2275 | if (ret != 0) | 2275 | if (ret != 0) |
2276 | return ret; | 2276 | return ret; |
2277 | 2277 | ||
2278 | ret = drm_addmap(dev, drm_get_resource_start(dev, 0), | 2278 | dev_priv->fb_aper_offset = drm_get_resource_start(dev, 0); |
2279 | ret = drm_addmap(dev, dev_priv->fb_aper_offset, | ||
2279 | drm_get_resource_len(dev, 0), _DRM_FRAME_BUFFER, | 2280 | drm_get_resource_len(dev, 0), _DRM_FRAME_BUFFER, |
2280 | _DRM_WRITE_COMBINING, &map); | 2281 | _DRM_WRITE_COMBINING, &map); |
2281 | if (ret != 0) | 2282 | if (ret != 0) |