diff options
| -rw-r--r-- | drivers/gpu/drm/nouveau/dispnv04/crtc.c | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/dispnv04/overlay.c | 4 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_abi16.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bo.c | 39 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bo.h | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_chan.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_display.c | 6 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_fbcon.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_prime.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/nv17_fence.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/nv50_display.c | 8 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/nv50_fence.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/nouveau/nv84_fence.c | 4 |
13 files changed, 52 insertions, 27 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c index 2a03e77abef4..38402ade6835 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c +++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c | |||
| @@ -614,7 +614,7 @@ nv_crtc_swap_fbs(struct drm_crtc *crtc, struct drm_framebuffer *old_fb) | |||
| 614 | struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); | 614 | struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); |
| 615 | int ret; | 615 | int ret; |
| 616 | 616 | ||
| 617 | ret = nouveau_bo_pin(nvfb->nvbo, TTM_PL_FLAG_VRAM); | 617 | ret = nouveau_bo_pin(nvfb->nvbo, TTM_PL_FLAG_VRAM, false); |
| 618 | if (ret == 0) { | 618 | if (ret == 0) { |
| 619 | if (disp->image[nv_crtc->index]) | 619 | if (disp->image[nv_crtc->index]) |
| 620 | nouveau_bo_unpin(disp->image[nv_crtc->index]); | 620 | nouveau_bo_unpin(disp->image[nv_crtc->index]); |
| @@ -1130,7 +1130,7 @@ nv04_crtc_create(struct drm_device *dev, int crtc_num) | |||
| 1130 | ret = nouveau_bo_new(dev, 64*64*4, 0x100, TTM_PL_FLAG_VRAM, | 1130 | ret = nouveau_bo_new(dev, 64*64*4, 0x100, TTM_PL_FLAG_VRAM, |
| 1131 | 0, 0x0000, NULL, NULL, &nv_crtc->cursor.nvbo); | 1131 | 0, 0x0000, NULL, NULL, &nv_crtc->cursor.nvbo); |
| 1132 | if (!ret) { | 1132 | if (!ret) { |
| 1133 | ret = nouveau_bo_pin(nv_crtc->cursor.nvbo, TTM_PL_FLAG_VRAM); | 1133 | ret = nouveau_bo_pin(nv_crtc->cursor.nvbo, TTM_PL_FLAG_VRAM, false); |
| 1134 | if (!ret) { | 1134 | if (!ret) { |
| 1135 | ret = nouveau_bo_map(nv_crtc->cursor.nvbo); | 1135 | ret = nouveau_bo_map(nv_crtc->cursor.nvbo); |
| 1136 | if (ret) | 1136 | if (ret) |
diff --git a/drivers/gpu/drm/nouveau/dispnv04/overlay.c b/drivers/gpu/drm/nouveau/dispnv04/overlay.c index 1e9056a8df94..9f2498571d09 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/overlay.c +++ b/drivers/gpu/drm/nouveau/dispnv04/overlay.c | |||
| @@ -126,7 +126,7 @@ nv10_update_plane(struct drm_plane *plane, struct drm_crtc *crtc, | |||
| 126 | return -ERANGE; | 126 | return -ERANGE; |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | ret = nouveau_bo_pin(nv_fb->nvbo, TTM_PL_FLAG_VRAM); | 129 | ret = nouveau_bo_pin(nv_fb->nvbo, TTM_PL_FLAG_VRAM, false); |
| 130 | if (ret) | 130 | if (ret) |
| 131 | return ret; | 131 | return ret; |
| 132 | 132 | ||
| @@ -373,7 +373,7 @@ nv04_update_plane(struct drm_plane *plane, struct drm_crtc *crtc, | |||
| 373 | if (crtc_w < src_w || crtc_h < src_h) | 373 | if (crtc_w < src_w || crtc_h < src_h) |
| 374 | return -ERANGE; | 374 | return -ERANGE; |
| 375 | 375 | ||
| 376 | ret = nouveau_bo_pin(nv_fb->nvbo, TTM_PL_FLAG_VRAM); | 376 | ret = nouveau_bo_pin(nv_fb->nvbo, TTM_PL_FLAG_VRAM, false); |
| 377 | if (ret) | 377 | if (ret) |
| 378 | return ret; | 378 | return ret; |
| 379 | 379 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c index a24faa5e2a2a..d39a15000068 100644 --- a/drivers/gpu/drm/nouveau/nouveau_abi16.c +++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c | |||
| @@ -308,7 +308,7 @@ nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS) | |||
| 308 | ret = nouveau_gem_new(dev, PAGE_SIZE, 0, NOUVEAU_GEM_DOMAIN_GART, | 308 | ret = nouveau_gem_new(dev, PAGE_SIZE, 0, NOUVEAU_GEM_DOMAIN_GART, |
| 309 | 0, 0, &chan->ntfy); | 309 | 0, 0, &chan->ntfy); |
| 310 | if (ret == 0) | 310 | if (ret == 0) |
| 311 | ret = nouveau_bo_pin(chan->ntfy, TTM_PL_FLAG_TT); | 311 | ret = nouveau_bo_pin(chan->ntfy, TTM_PL_FLAG_TT, false); |
| 312 | if (ret) | 312 | if (ret) |
| 313 | goto done; | 313 | goto done; |
| 314 | 314 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 5ece6efeab80..21ec561edc99 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c | |||
| @@ -310,26 +310,49 @@ nouveau_bo_placement_set(struct nouveau_bo *nvbo, uint32_t type, uint32_t busy) | |||
| 310 | } | 310 | } |
| 311 | 311 | ||
| 312 | int | 312 | int |
| 313 | nouveau_bo_pin(struct nouveau_bo *nvbo, uint32_t memtype) | 313 | nouveau_bo_pin(struct nouveau_bo *nvbo, uint32_t memtype, bool contig) |
| 314 | { | 314 | { |
| 315 | struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev); | 315 | struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev); |
| 316 | struct ttm_buffer_object *bo = &nvbo->bo; | 316 | struct ttm_buffer_object *bo = &nvbo->bo; |
| 317 | bool force = false, evict = false; | ||
| 317 | int ret; | 318 | int ret; |
| 318 | 319 | ||
| 319 | ret = ttm_bo_reserve(bo, false, false, false, NULL); | 320 | ret = ttm_bo_reserve(bo, false, false, false, NULL); |
| 320 | if (ret) | 321 | if (ret) |
| 321 | return ret; | 322 | return ret; |
| 322 | 323 | ||
| 323 | if (nvbo->pin_refcnt && !(memtype & (1 << bo->mem.mem_type))) { | 324 | if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA && |
| 324 | NV_ERROR(drm, "bo %p pinned elsewhere: 0x%08x vs 0x%08x\n", bo, | 325 | memtype == TTM_PL_FLAG_VRAM && contig) { |
| 325 | 1 << bo->mem.mem_type, memtype); | 326 | if (nvbo->tile_flags & NOUVEAU_GEM_TILE_NONCONTIG) { |
| 326 | ret = -EINVAL; | 327 | if (bo->mem.mem_type == TTM_PL_VRAM) { |
| 327 | goto out; | 328 | struct nouveau_mem *mem = bo->mem.mm_node; |
| 329 | if (!list_is_singular(&mem->regions)) | ||
| 330 | evict = true; | ||
| 331 | } | ||
| 332 | nvbo->tile_flags &= ~NOUVEAU_GEM_TILE_NONCONTIG; | ||
| 333 | force = true; | ||
| 334 | } | ||
| 328 | } | 335 | } |
| 329 | 336 | ||
| 330 | if (nvbo->pin_refcnt++) | 337 | if (nvbo->pin_refcnt) { |
| 338 | if (!(memtype & (1 << bo->mem.mem_type)) || evict) { | ||
| 339 | NV_ERROR(drm, "bo %p pinned elsewhere: " | ||
| 340 | "0x%08x vs 0x%08x\n", bo, | ||
| 341 | 1 << bo->mem.mem_type, memtype); | ||
| 342 | ret = -EBUSY; | ||
| 343 | } | ||
| 344 | nvbo->pin_refcnt++; | ||
| 331 | goto out; | 345 | goto out; |
| 346 | } | ||
| 332 | 347 | ||
| 348 | if (evict) { | ||
| 349 | nouveau_bo_placement_set(nvbo, TTM_PL_FLAG_TT, 0); | ||
| 350 | ret = nouveau_bo_validate(nvbo, false, false); | ||
| 351 | if (ret) | ||
| 352 | goto out; | ||
| 353 | } | ||
| 354 | |||
| 355 | nvbo->pin_refcnt++; | ||
| 333 | nouveau_bo_placement_set(nvbo, memtype, 0); | 356 | nouveau_bo_placement_set(nvbo, memtype, 0); |
| 334 | 357 | ||
| 335 | /* drop pin_refcnt temporarily, so we don't trip the assertion | 358 | /* drop pin_refcnt temporarily, so we don't trip the assertion |
| @@ -354,6 +377,8 @@ nouveau_bo_pin(struct nouveau_bo *nvbo, uint32_t memtype) | |||
| 354 | } | 377 | } |
| 355 | 378 | ||
| 356 | out: | 379 | out: |
| 380 | if (force && ret) | ||
| 381 | nvbo->tile_flags |= NOUVEAU_GEM_TILE_NONCONTIG; | ||
| 357 | ttm_bo_unreserve(bo); | 382 | ttm_bo_unreserve(bo); |
| 358 | return ret; | 383 | return ret; |
| 359 | } | 384 | } |
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.h b/drivers/gpu/drm/nouveau/nouveau_bo.h index c827f233e41d..072222efeeb7 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.h +++ b/drivers/gpu/drm/nouveau/nouveau_bo.h | |||
| @@ -73,7 +73,7 @@ int nouveau_bo_new(struct drm_device *, int size, int align, u32 flags, | |||
| 73 | u32 tile_mode, u32 tile_flags, struct sg_table *sg, | 73 | u32 tile_mode, u32 tile_flags, struct sg_table *sg, |
| 74 | struct reservation_object *robj, | 74 | struct reservation_object *robj, |
| 75 | struct nouveau_bo **); | 75 | struct nouveau_bo **); |
| 76 | int nouveau_bo_pin(struct nouveau_bo *, u32 flags); | 76 | int nouveau_bo_pin(struct nouveau_bo *, u32 flags, bool contig); |
| 77 | int nouveau_bo_unpin(struct nouveau_bo *); | 77 | int nouveau_bo_unpin(struct nouveau_bo *); |
| 78 | int nouveau_bo_map(struct nouveau_bo *); | 78 | int nouveau_bo_map(struct nouveau_bo *); |
| 79 | void nouveau_bo_unmap(struct nouveau_bo *); | 79 | void nouveau_bo_unmap(struct nouveau_bo *); |
diff --git a/drivers/gpu/drm/nouveau/nouveau_chan.c b/drivers/gpu/drm/nouveau/nouveau_chan.c index 0f3da86840f2..aff9099aae6c 100644 --- a/drivers/gpu/drm/nouveau/nouveau_chan.c +++ b/drivers/gpu/drm/nouveau/nouveau_chan.c | |||
| @@ -109,7 +109,7 @@ nouveau_channel_prep(struct nouveau_drm *drm, struct nvif_device *device, | |||
| 109 | ret = nouveau_bo_new(drm->dev, size, 0, target, 0, 0, NULL, NULL, | 109 | ret = nouveau_bo_new(drm->dev, size, 0, target, 0, 0, NULL, NULL, |
| 110 | &chan->push.buffer); | 110 | &chan->push.buffer); |
| 111 | if (ret == 0) { | 111 | if (ret == 0) { |
| 112 | ret = nouveau_bo_pin(chan->push.buffer, target); | 112 | ret = nouveau_bo_pin(chan->push.buffer, target, false); |
| 113 | if (ret == 0) | 113 | if (ret == 0) |
| 114 | ret = nouveau_bo_map(chan->push.buffer); | 114 | ret = nouveau_bo_map(chan->push.buffer); |
| 115 | } | 115 | } |
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index e02ab391c870..f9a0f1dc15f9 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c | |||
| @@ -592,7 +592,7 @@ nouveau_display_resume(struct drm_device *dev, bool runtime) | |||
| 592 | if (!nouveau_fb || !nouveau_fb->nvbo) | 592 | if (!nouveau_fb || !nouveau_fb->nvbo) |
| 593 | continue; | 593 | continue; |
| 594 | 594 | ||
| 595 | ret = nouveau_bo_pin(nouveau_fb->nvbo, TTM_PL_FLAG_VRAM); | 595 | ret = nouveau_bo_pin(nouveau_fb->nvbo, TTM_PL_FLAG_VRAM, false); |
| 596 | if (ret) | 596 | if (ret) |
| 597 | NV_ERROR(drm, "Could not pin framebuffer\n"); | 597 | NV_ERROR(drm, "Could not pin framebuffer\n"); |
| 598 | } | 598 | } |
| @@ -600,7 +600,7 @@ nouveau_display_resume(struct drm_device *dev, bool runtime) | |||
| 600 | list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { | 600 | list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { |
| 601 | struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); | 601 | struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); |
| 602 | 602 | ||
| 603 | ret = nouveau_bo_pin(nv_crtc->cursor.nvbo, TTM_PL_FLAG_VRAM); | 603 | ret = nouveau_bo_pin(nv_crtc->cursor.nvbo, TTM_PL_FLAG_VRAM, false); |
| 604 | if (!ret) | 604 | if (!ret) |
| 605 | ret = nouveau_bo_map(nv_crtc->cursor.nvbo); | 605 | ret = nouveau_bo_map(nv_crtc->cursor.nvbo); |
| 606 | if (ret) | 606 | if (ret) |
| @@ -713,7 +713,7 @@ nouveau_crtc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb, | |||
| 713 | return -ENOMEM; | 713 | return -ENOMEM; |
| 714 | 714 | ||
| 715 | if (new_bo != old_bo) { | 715 | if (new_bo != old_bo) { |
| 716 | ret = nouveau_bo_pin(new_bo, TTM_PL_FLAG_VRAM); | 716 | ret = nouveau_bo_pin(new_bo, TTM_PL_FLAG_VRAM, false); |
| 717 | if (ret) | 717 | if (ret) |
| 718 | goto fail_free; | 718 | goto fail_free; |
| 719 | } | 719 | } |
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index b3a58b384256..3ed12a8cfc91 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c | |||
| @@ -341,7 +341,7 @@ nouveau_fbcon_create(struct drm_fb_helper *helper, | |||
| 341 | goto out; | 341 | goto out; |
| 342 | } | 342 | } |
| 343 | 343 | ||
| 344 | ret = nouveau_bo_pin(nvbo, TTM_PL_FLAG_VRAM); | 344 | ret = nouveau_bo_pin(nvbo, TTM_PL_FLAG_VRAM, false); |
| 345 | if (ret) { | 345 | if (ret) { |
| 346 | NV_ERROR(drm, "failed to pin fb: %d\n", ret); | 346 | NV_ERROR(drm, "failed to pin fb: %d\n", ret); |
| 347 | goto out_unref; | 347 | goto out_unref; |
diff --git a/drivers/gpu/drm/nouveau/nouveau_prime.c b/drivers/gpu/drm/nouveau/nouveau_prime.c index 228226ab27fc..dd32ad6db53d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_prime.c +++ b/drivers/gpu/drm/nouveau/nouveau_prime.c | |||
| @@ -93,7 +93,7 @@ int nouveau_gem_prime_pin(struct drm_gem_object *obj) | |||
| 93 | int ret; | 93 | int ret; |
| 94 | 94 | ||
| 95 | /* pin buffer into GTT */ | 95 | /* pin buffer into GTT */ |
| 96 | ret = nouveau_bo_pin(nvbo, TTM_PL_FLAG_TT); | 96 | ret = nouveau_bo_pin(nvbo, TTM_PL_FLAG_TT, false); |
| 97 | if (ret) | 97 | if (ret) |
| 98 | return -EINVAL; | 98 | return -EINVAL; |
| 99 | 99 | ||
diff --git a/drivers/gpu/drm/nouveau/nv17_fence.c b/drivers/gpu/drm/nouveau/nv17_fence.c index 40b461c7d5c5..57860cfa1de5 100644 --- a/drivers/gpu/drm/nouveau/nv17_fence.c +++ b/drivers/gpu/drm/nouveau/nv17_fence.c | |||
| @@ -131,7 +131,7 @@ nv17_fence_create(struct nouveau_drm *drm) | |||
| 131 | ret = nouveau_bo_new(drm->dev, 4096, 0x1000, TTM_PL_FLAG_VRAM, | 131 | ret = nouveau_bo_new(drm->dev, 4096, 0x1000, TTM_PL_FLAG_VRAM, |
| 132 | 0, 0x0000, NULL, NULL, &priv->bo); | 132 | 0, 0x0000, NULL, NULL, &priv->bo); |
| 133 | if (!ret) { | 133 | if (!ret) { |
| 134 | ret = nouveau_bo_pin(priv->bo, TTM_PL_FLAG_VRAM); | 134 | ret = nouveau_bo_pin(priv->bo, TTM_PL_FLAG_VRAM, false); |
| 135 | if (!ret) { | 135 | if (!ret) { |
| 136 | ret = nouveau_bo_map(priv->bo); | 136 | ret = nouveau_bo_map(priv->bo); |
| 137 | if (ret) | 137 | if (ret) |
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c index 2016d8ece028..2b5aefb3b9e5 100644 --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c | |||
| @@ -1073,7 +1073,7 @@ nv50_crtc_swap_fbs(struct drm_crtc *crtc, struct drm_framebuffer *old_fb) | |||
| 1073 | struct nv50_head *head = nv50_head(crtc); | 1073 | struct nv50_head *head = nv50_head(crtc); |
| 1074 | int ret; | 1074 | int ret; |
| 1075 | 1075 | ||
| 1076 | ret = nouveau_bo_pin(nvfb->nvbo, TTM_PL_FLAG_VRAM); | 1076 | ret = nouveau_bo_pin(nvfb->nvbo, TTM_PL_FLAG_VRAM, false); |
| 1077 | if (ret == 0) { | 1077 | if (ret == 0) { |
| 1078 | if (head->image) | 1078 | if (head->image) |
| 1079 | nouveau_bo_unpin(head->image); | 1079 | nouveau_bo_unpin(head->image); |
| @@ -1402,7 +1402,7 @@ nv50_crtc_create(struct drm_device *dev, int index) | |||
| 1402 | ret = nouveau_bo_new(dev, 8192, 0x100, TTM_PL_FLAG_VRAM, | 1402 | ret = nouveau_bo_new(dev, 8192, 0x100, TTM_PL_FLAG_VRAM, |
| 1403 | 0, 0x0000, NULL, NULL, &head->base.lut.nvbo); | 1403 | 0, 0x0000, NULL, NULL, &head->base.lut.nvbo); |
| 1404 | if (!ret) { | 1404 | if (!ret) { |
| 1405 | ret = nouveau_bo_pin(head->base.lut.nvbo, TTM_PL_FLAG_VRAM); | 1405 | ret = nouveau_bo_pin(head->base.lut.nvbo, TTM_PL_FLAG_VRAM, false); |
| 1406 | if (!ret) { | 1406 | if (!ret) { |
| 1407 | ret = nouveau_bo_map(head->base.lut.nvbo); | 1407 | ret = nouveau_bo_map(head->base.lut.nvbo); |
| 1408 | if (ret) | 1408 | if (ret) |
| @@ -1425,7 +1425,7 @@ nv50_crtc_create(struct drm_device *dev, int index) | |||
| 1425 | ret = nouveau_bo_new(dev, 64 * 64 * 4, 0x100, TTM_PL_FLAG_VRAM, | 1425 | ret = nouveau_bo_new(dev, 64 * 64 * 4, 0x100, TTM_PL_FLAG_VRAM, |
| 1426 | 0, 0x0000, NULL, NULL, &head->base.cursor.nvbo); | 1426 | 0, 0x0000, NULL, NULL, &head->base.cursor.nvbo); |
| 1427 | if (!ret) { | 1427 | if (!ret) { |
| 1428 | ret = nouveau_bo_pin(head->base.cursor.nvbo, TTM_PL_FLAG_VRAM); | 1428 | ret = nouveau_bo_pin(head->base.cursor.nvbo, TTM_PL_FLAG_VRAM, false); |
| 1429 | if (!ret) { | 1429 | if (!ret) { |
| 1430 | ret = nouveau_bo_map(head->base.cursor.nvbo); | 1430 | ret = nouveau_bo_map(head->base.cursor.nvbo); |
| 1431 | if (ret) | 1431 | if (ret) |
| @@ -2487,7 +2487,7 @@ nv50_display_create(struct drm_device *dev) | |||
| 2487 | ret = nouveau_bo_new(dev, 4096, 0x1000, TTM_PL_FLAG_VRAM, | 2487 | ret = nouveau_bo_new(dev, 4096, 0x1000, TTM_PL_FLAG_VRAM, |
| 2488 | 0, 0x0000, NULL, NULL, &disp->sync); | 2488 | 0, 0x0000, NULL, NULL, &disp->sync); |
| 2489 | if (!ret) { | 2489 | if (!ret) { |
| 2490 | ret = nouveau_bo_pin(disp->sync, TTM_PL_FLAG_VRAM); | 2490 | ret = nouveau_bo_pin(disp->sync, TTM_PL_FLAG_VRAM, false); |
| 2491 | if (!ret) { | 2491 | if (!ret) { |
| 2492 | ret = nouveau_bo_map(disp->sync); | 2492 | ret = nouveau_bo_map(disp->sync); |
| 2493 | if (ret) | 2493 | if (ret) |
diff --git a/drivers/gpu/drm/nouveau/nv50_fence.c b/drivers/gpu/drm/nouveau/nv50_fence.c index 22d242b37962..a82d9ea7c6fd 100644 --- a/drivers/gpu/drm/nouveau/nv50_fence.c +++ b/drivers/gpu/drm/nouveau/nv50_fence.c | |||
| @@ -102,7 +102,7 @@ nv50_fence_create(struct nouveau_drm *drm) | |||
| 102 | ret = nouveau_bo_new(drm->dev, 4096, 0x1000, TTM_PL_FLAG_VRAM, | 102 | ret = nouveau_bo_new(drm->dev, 4096, 0x1000, TTM_PL_FLAG_VRAM, |
| 103 | 0, 0x0000, NULL, NULL, &priv->bo); | 103 | 0, 0x0000, NULL, NULL, &priv->bo); |
| 104 | if (!ret) { | 104 | if (!ret) { |
| 105 | ret = nouveau_bo_pin(priv->bo, TTM_PL_FLAG_VRAM); | 105 | ret = nouveau_bo_pin(priv->bo, TTM_PL_FLAG_VRAM, false); |
| 106 | if (!ret) { | 106 | if (!ret) { |
| 107 | ret = nouveau_bo_map(priv->bo); | 107 | ret = nouveau_bo_map(priv->bo); |
| 108 | if (ret) | 108 | if (ret) |
diff --git a/drivers/gpu/drm/nouveau/nv84_fence.c b/drivers/gpu/drm/nouveau/nv84_fence.c index 4d79be7558d8..cb5b88938d45 100644 --- a/drivers/gpu/drm/nouveau/nv84_fence.c +++ b/drivers/gpu/drm/nouveau/nv84_fence.c | |||
| @@ -234,7 +234,7 @@ nv84_fence_create(struct nouveau_drm *drm) | |||
| 234 | ret = nouveau_bo_new(drm->dev, 16 * priv->base.contexts, 0, | 234 | ret = nouveau_bo_new(drm->dev, 16 * priv->base.contexts, 0, |
| 235 | TTM_PL_FLAG_VRAM, 0, 0, NULL, NULL, &priv->bo); | 235 | TTM_PL_FLAG_VRAM, 0, 0, NULL, NULL, &priv->bo); |
| 236 | if (ret == 0) { | 236 | if (ret == 0) { |
| 237 | ret = nouveau_bo_pin(priv->bo, TTM_PL_FLAG_VRAM); | 237 | ret = nouveau_bo_pin(priv->bo, TTM_PL_FLAG_VRAM, false); |
| 238 | if (ret == 0) { | 238 | if (ret == 0) { |
| 239 | ret = nouveau_bo_map(priv->bo); | 239 | ret = nouveau_bo_map(priv->bo); |
| 240 | if (ret) | 240 | if (ret) |
| @@ -249,7 +249,7 @@ nv84_fence_create(struct nouveau_drm *drm) | |||
| 249 | TTM_PL_FLAG_TT | TTM_PL_FLAG_UNCACHED, 0, | 249 | TTM_PL_FLAG_TT | TTM_PL_FLAG_UNCACHED, 0, |
| 250 | 0, NULL, NULL, &priv->bo_gart); | 250 | 0, NULL, NULL, &priv->bo_gart); |
| 251 | if (ret == 0) { | 251 | if (ret == 0) { |
| 252 | ret = nouveau_bo_pin(priv->bo_gart, TTM_PL_FLAG_TT); | 252 | ret = nouveau_bo_pin(priv->bo_gart, TTM_PL_FLAG_TT, false); |
| 253 | if (ret == 0) { | 253 | if (ret == 0) { |
| 254 | ret = nouveau_bo_map(priv->bo_gart); | 254 | ret = nouveau_bo_map(priv->bo_gart); |
| 255 | if (ret) | 255 | if (ret) |
