|
@@ -756,7 +756,7 @@ static int radeon_ttm_tt_populate(struct ttm_tt *ttm,
|
|
|
#endif
|
|
|
|
|
|
#ifdef CONFIG_SWIOTLB
|
|
|
- if (swiotlb_nr_tbl()) {
|
|
|
+ if (rdev->need_swiotlb && swiotlb_nr_tbl()) {
|
|
|
return ttm_dma_populate(>t->ttm, rdev->dev, ctx);
|
|
|
}
|
|
|
#endif
|
|
@@ -788,7 +788,7 @@ static void radeon_ttm_tt_unpopulate(struct ttm_tt *ttm)
|
|
|
#endif
|
|
|
|
|
|
#ifdef CONFIG_SWIOTLB
|
|
|
- if (swiotlb_nr_tbl()) {
|
|
|
+ if (rdev->need_swiotlb && swiotlb_nr_tbl()) {
|
|
|
ttm_dma_unpopulate(>t->ttm, rdev->dev);
|
|
|
return;
|
|
|
}
|
|
@@ -1155,7 +1155,7 @@ static int radeon_ttm_debugfs_init(struct radeon_device *rdev)
|
|
|
count = ARRAY_SIZE(radeon_ttm_debugfs_list);
|
|
|
|
|
|
#ifdef CONFIG_SWIOTLB
|
|
|
- if (!swiotlb_nr_tbl())
|
|
|
+ if (!(rdev->need_swiotlb && swiotlb_nr_tbl()))
|
|
|
--count;
|
|
|
#endif
|
|
|
|