aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_bo.c
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2016-03-02 05:12:27 -0500
committerBen Skeggs <bskeggs@redhat.com>2016-03-13 20:13:32 -0400
commit9bcd38de5be745af218df9f569ec01b62905fabf (patch)
tree9da76b448bef37d9a48c35fc682802e7630ee5c1 /drivers/gpu/drm/nouveau/nouveau_bo.c
parentab08f38cacd47168db1d568ae0a8249105e0cc06 (diff)
drm/nouveau/bo: consider DMA buffers on x86 only
The DMA API has different semantics on different architectures. Currently on arm64, it can only provide memory from a small pool which dries up quickly if we attempt to allocate big buffers from it. Do not consider that option when running on non-x86, since regular TTM buffers are the (current) best-fit for ARM platforms. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_bo.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_bo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index e3acc35e3805..2cdaea58678d 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -1502,7 +1502,7 @@ nouveau_ttm_tt_populate(struct ttm_tt *ttm)
1502 } 1502 }
1503#endif 1503#endif
1504 1504
1505#ifdef CONFIG_SWIOTLB 1505#if IS_ENABLED(CONFIG_SWIOTLB) && IS_ENABLED(CONFIG_X86)
1506 if (swiotlb_nr_tbl()) { 1506 if (swiotlb_nr_tbl()) {
1507 return ttm_dma_populate((void *)ttm, dev->dev); 1507 return ttm_dma_populate((void *)ttm, dev->dev);
1508 } 1508 }
@@ -1570,7 +1570,7 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm)
1570 } 1570 }
1571#endif 1571#endif
1572 1572
1573#ifdef CONFIG_SWIOTLB 1573#if IS_ENABLED(CONFIG_SWIOTLB) && IS_ENABLED(CONFIG_X86)
1574 if (swiotlb_nr_tbl()) { 1574 if (swiotlb_nr_tbl()) {
1575 ttm_dma_unpopulate((void *)ttm, dev->dev); 1575 ttm_dma_unpopulate((void *)ttm, dev->dev);
1576 return; 1576 return;