diff options
author | Michel Dänzer <daenzer@vmware.com> | 2009-06-15 10:56:11 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-06-18 19:23:03 -0400 |
commit | 55c93278ec03c349af7b01933655b31c7f740df4 (patch) | |
tree | adbba4bba6344ec4e4e1429b726de8f4e1eb7a75 /drivers/gpu | |
parent | 0454beab0f6bc6d350860abd549b86959d2f6f40 (diff) |
drm/radeon: Respect AGP cant_use_aperture flag.
Some AGP devices can't map the aperture, radeon needs to tell TTM this.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_ttm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index 4c087c1510d7..1227a97f5169 100644 --- a/drivers/gpu/drm/radeon/radeon_ttm.c +++ b/drivers/gpu/drm/radeon/radeon_ttm.c | |||
@@ -133,6 +133,7 @@ static int radeon_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, | |||
133 | man->gpu_offset = 0; | 133 | man->gpu_offset = 0; |
134 | man->available_caching = TTM_PL_MASK_CACHING; | 134 | man->available_caching = TTM_PL_MASK_CACHING; |
135 | man->default_caching = TTM_PL_FLAG_CACHED; | 135 | man->default_caching = TTM_PL_FLAG_CACHED; |
136 | man->flags = TTM_MEMTYPE_FLAG_MAPPABLE | TTM_MEMTYPE_FLAG_CMA; | ||
136 | #if __OS_HAS_AGP | 137 | #if __OS_HAS_AGP |
137 | if (rdev->flags & RADEON_IS_AGP) { | 138 | if (rdev->flags & RADEON_IS_AGP) { |
138 | if (!(drm_core_has_AGP(rdev->ddev) && rdev->ddev->agp)) { | 139 | if (!(drm_core_has_AGP(rdev->ddev) && rdev->ddev->agp)) { |
@@ -143,8 +144,9 @@ static int radeon_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, | |||
143 | man->io_offset = rdev->mc.agp_base; | 144 | man->io_offset = rdev->mc.agp_base; |
144 | man->io_size = rdev->mc.gtt_size; | 145 | man->io_size = rdev->mc.gtt_size; |
145 | man->io_addr = NULL; | 146 | man->io_addr = NULL; |
146 | man->flags = TTM_MEMTYPE_FLAG_NEEDS_IOREMAP | | 147 | if (!rdev->ddev->agp->cant_use_aperture) |
147 | TTM_MEMTYPE_FLAG_MAPPABLE; | 148 | man->flags = TTM_MEMTYPE_FLAG_NEEDS_IOREMAP | |
149 | TTM_MEMTYPE_FLAG_MAPPABLE; | ||
148 | man->available_caching = TTM_PL_FLAG_UNCACHED | | 150 | man->available_caching = TTM_PL_FLAG_UNCACHED | |
149 | TTM_PL_FLAG_WC; | 151 | TTM_PL_FLAG_WC; |
150 | man->default_caching = TTM_PL_FLAG_WC; | 152 | man->default_caching = TTM_PL_FLAG_WC; |
@@ -154,8 +156,6 @@ static int radeon_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, | |||
154 | man->io_offset = 0; | 156 | man->io_offset = 0; |
155 | man->io_size = 0; | 157 | man->io_size = 0; |
156 | man->io_addr = NULL; | 158 | man->io_addr = NULL; |
157 | man->flags = TTM_MEMTYPE_FLAG_MAPPABLE | | ||
158 | TTM_MEMTYPE_FLAG_CMA; | ||
159 | } | 159 | } |
160 | break; | 160 | break; |
161 | case TTM_PL_VRAM: | 161 | case TTM_PL_VRAM: |