aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/r100.c
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2010-02-19 09:33:54 -0500
committerDave Airlie <airlied@redhat.com>2010-02-24 20:32:36 -0500
commit51e5fcd353a55364984bda3dd1391742e4dec53c (patch)
treeae93752cb78ef228eb48ec961d9e9702796751b7 /drivers/gpu/drm/radeon/r100.c
parent22e6dd7e700111c1aa49581d27f2b349cbc798dd (diff)
drm/radeon/kms: force pinning buffer into visible VRAM
This patch properly set visible VRAM and enforce any pinned buffer to be into visible VRAM. We might later add a flag to release this constraint for some newer hw more clever than previous. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r100.c')
-rw-r--r--drivers/gpu/drm/radeon/r100.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index 1fdd793343b9..91eb762eb3f9 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -1958,9 +1958,12 @@ void r100_vram_init_sizes(struct radeon_device *rdev)
1958 u64 config_aper_size; 1958 u64 config_aper_size;
1959 1959
1960 /* work out accessible VRAM */ 1960 /* work out accessible VRAM */
1961 rdev->mc.visible_vram_size = r100_get_accessible_vram(rdev);
1962 rdev->mc.aper_base = drm_get_resource_start(rdev->ddev, 0); 1961 rdev->mc.aper_base = drm_get_resource_start(rdev->ddev, 0);
1963 rdev->mc.aper_size = drm_get_resource_len(rdev->ddev, 0); 1962 rdev->mc.aper_size = drm_get_resource_len(rdev->ddev, 0);
1963 rdev->mc.visible_vram_size = r100_get_accessible_vram(rdev);
1964 /* FIXME we don't use the second aperture yet when we could use it */
1965 if (rdev->mc.visible_vram_size > rdev->mc.aper_size)
1966 rdev->mc.visible_vram_size = rdev->mc.aper_size;
1964 config_aper_size = RREG32(RADEON_CONFIG_APER_SIZE); 1967 config_aper_size = RREG32(RADEON_CONFIG_APER_SIZE);
1965 if (rdev->flags & RADEON_IS_IGP) { 1968 if (rdev->flags & RADEON_IS_IGP) {
1966 uint32_t tom; 1969 uint32_t tom;