aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index e4bb435e614b..d897c4c61a01 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -1018,7 +1018,7 @@ static int amdgpu_ttm_tt_populate(struct ttm_tt *ttm,
1018 } 1018 }
1019 1019
1020#ifdef CONFIG_SWIOTLB 1020#ifdef CONFIG_SWIOTLB
1021 if (swiotlb_nr_tbl()) { 1021 if (adev->need_swiotlb && swiotlb_nr_tbl()) {
1022 return ttm_dma_populate(&gtt->ttm, adev->dev, ctx); 1022 return ttm_dma_populate(&gtt->ttm, adev->dev, ctx);
1023 } 1023 }
1024#endif 1024#endif
@@ -1045,7 +1045,7 @@ static void amdgpu_ttm_tt_unpopulate(struct ttm_tt *ttm)
1045 adev = amdgpu_ttm_adev(ttm->bdev); 1045 adev = amdgpu_ttm_adev(ttm->bdev);
1046 1046
1047#ifdef CONFIG_SWIOTLB 1047#ifdef CONFIG_SWIOTLB
1048 if (swiotlb_nr_tbl()) { 1048 if (adev->need_swiotlb && swiotlb_nr_tbl()) {
1049 ttm_dma_unpopulate(&gtt->ttm, adev->dev); 1049 ttm_dma_unpopulate(&gtt->ttm, adev->dev);
1050 return; 1050 return;
1051 } 1051 }
@@ -2010,7 +2010,7 @@ static int amdgpu_ttm_debugfs_init(struct amdgpu_device *adev)
2010 count = ARRAY_SIZE(amdgpu_ttm_debugfs_list); 2010 count = ARRAY_SIZE(amdgpu_ttm_debugfs_list);
2011 2011
2012#ifdef CONFIG_SWIOTLB 2012#ifdef CONFIG_SWIOTLB
2013 if (!swiotlb_nr_tbl()) 2013 if (!(adev->need_swiotlb && swiotlb_nr_tbl()))
2014 --count; 2014 --count;
2015#endif 2015#endif
2016 2016