aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_bo.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_bo.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_bo.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 8cf4a48f872e..724b41a2b9e9 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -1066,6 +1066,12 @@ nouveau_ttm_tt_populate(struct ttm_tt *ttm)
1066 dev_priv = nouveau_bdev(ttm->bdev); 1066 dev_priv = nouveau_bdev(ttm->bdev);
1067 dev = dev_priv->dev; 1067 dev = dev_priv->dev;
1068 1068
1069#if __OS_HAS_AGP
1070 if (dev_priv->gart_info.type == NOUVEAU_GART_AGP) {
1071 return ttm_agp_tt_populate(ttm);
1072 }
1073#endif
1074
1069#ifdef CONFIG_SWIOTLB 1075#ifdef CONFIG_SWIOTLB
1070 if (swiotlb_nr_tbl()) { 1076 if (swiotlb_nr_tbl()) {
1071 return ttm_dma_populate((void *)ttm, dev->dev); 1077 return ttm_dma_populate((void *)ttm, dev->dev);
@@ -1105,6 +1111,13 @@ nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm)
1105 dev_priv = nouveau_bdev(ttm->bdev); 1111 dev_priv = nouveau_bdev(ttm->bdev);
1106 dev = dev_priv->dev; 1112 dev = dev_priv->dev;
1107 1113
1114#if __OS_HAS_AGP
1115 if (dev_priv->gart_info.type == NOUVEAU_GART_AGP) {
1116 ttm_agp_tt_unpopulate(ttm);
1117 return;
1118 }
1119#endif
1120
1108#ifdef CONFIG_SWIOTLB 1121#ifdef CONFIG_SWIOTLB
1109 if (swiotlb_nr_tbl()) { 1122 if (swiotlb_nr_tbl()) {
1110 ttm_dma_unpopulate((void *)ttm, dev->dev); 1123 ttm_dma_unpopulate((void *)ttm, dev->dev);