[PATCH 3/3] drm/radeon: drop superflous AGP handling
Christian König
ckoenig.leichtzumerken at gmail.com
Thu Aug 6 13:51:48 UTC 2020
The object flags created in radeon_ttm_placement_from_domain take care that
we use the correct caching for AGP, this is just superflous.
Signed-off-by: Christian König <christian.koenig at amd.com>
---
drivers/gpu/drm/radeon/radeon_ttm.c | 21 ++-------------------
1 file changed, 2 insertions(+), 19 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index 31f4cf211b6a..290c8b479853 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -76,26 +76,9 @@ static int radeon_ttm_init_vram(struct radeon_device *rdev)
static int radeon_ttm_init_gtt(struct radeon_device *rdev)
{
- uint32_t available_caching, default_caching;
-
- available_caching = TTM_PL_MASK_CACHING;
- default_caching = TTM_PL_FLAG_CACHED;
-
-#if IS_ENABLED(CONFIG_AGP)
- if (rdev->flags & RADEON_IS_AGP) {
- if (!rdev->ddev->agp) {
- DRM_ERROR("AGP is not enabled\n");
- return -EINVAL;
- }
- available_caching = TTM_PL_FLAG_UNCACHED |
- TTM_PL_FLAG_WC;
- default_caching = TTM_PL_FLAG_WC;
- }
-#endif
-
return ttm_range_man_init(&rdev->mman.bdev, TTM_PL_TT,
- available_caching,
- default_caching, true,
+ TTM_PL_MASK_CACHING,
+ TTM_PL_FLAG_CACHED, true,
rdev->mc.gtt_size >> PAGE_SHIFT);
}
--
2.17.1
More information about the amd-gfx
mailing list