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.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 7ff10711a4d0..4b1afb131380 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -255,7 +255,7 @@ set_placement_range(struct nouveau_bo *nvbo, uint32_t type)
255{ 255{
256 struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev); 256 struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev);
257 struct nouveau_fb *pfb = nouveau_fb(drm->device); 257 struct nouveau_fb *pfb = nouveau_fb(drm->device);
258 u32 vram_pages = pfb->ram.size >> PAGE_SHIFT; 258 u32 vram_pages = pfb->ram->size >> PAGE_SHIFT;
259 259
260 if (nv_device(drm->device)->card_type == NV_10 && 260 if (nv_device(drm->device)->card_type == NV_10 &&
261 nvbo->tile_mode && (type & TTM_PL_FLAG_VRAM) && 261 nvbo->tile_mode && (type & TTM_PL_FLAG_VRAM) &&
@@ -968,7 +968,7 @@ nouveau_bo_move_m2mf(struct ttm_buffer_object *bo, int evict, bool intr,
968 bool no_wait_gpu, struct ttm_mem_reg *new_mem) 968 bool no_wait_gpu, struct ttm_mem_reg *new_mem)
969{ 969{
970 struct nouveau_drm *drm = nouveau_bdev(bo->bdev); 970 struct nouveau_drm *drm = nouveau_bdev(bo->bdev);
971 struct nouveau_channel *chan = chan = drm->channel; 971 struct nouveau_channel *chan = chan = drm->ttm.chan;
972 struct nouveau_bo *nvbo = nouveau_bo(bo); 972 struct nouveau_bo *nvbo = nouveau_bo(bo);
973 struct ttm_mem_reg *old_mem = &bo->mem; 973 struct ttm_mem_reg *old_mem = &bo->mem;
974 int ret; 974 int ret;
@@ -1052,6 +1052,7 @@ nouveau_bo_move_init(struct nouveau_drm *drm)
1052 } 1052 }
1053 1053
1054 drm->ttm.move = mthd->exec; 1054 drm->ttm.move = mthd->exec;
1055 drm->ttm.chan = chan;
1055 name = mthd->name; 1056 name = mthd->name;
1056 break; 1057 break;
1057 } 1058 }
@@ -1550,13 +1551,8 @@ void
1550nouveau_bo_vma_del(struct nouveau_bo *nvbo, struct nouveau_vma *vma) 1551nouveau_bo_vma_del(struct nouveau_bo *nvbo, struct nouveau_vma *vma)
1551{ 1552{
1552 if (vma->node) { 1553 if (vma->node) {
1553 if (nvbo->bo.mem.mem_type != TTM_PL_SYSTEM) { 1554 if (nvbo->bo.mem.mem_type != TTM_PL_SYSTEM)
1554 spin_lock(&nvbo->bo.bdev->fence_lock);
1555 ttm_bo_wait(&nvbo->bo, false, false, false);
1556 spin_unlock(&nvbo->bo.bdev->fence_lock);
1557 nouveau_vm_unmap(vma); 1555 nouveau_vm_unmap(vma);
1558 }
1559
1560 nouveau_vm_put(vma); 1556 nouveau_vm_put(vma);
1561 list_del(&vma->head); 1557 list_del(&vma->head);
1562 } 1558 }