aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/radeon/radeon_ttm.c8
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: