diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_bo.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bo.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 6f3c19522377..3ca8343c15df 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c | |||
@@ -461,9 +461,9 @@ nouveau_bo_move_accel_cleanup(struct nouveau_channel *chan, | |||
461 | return ret; | 461 | return ret; |
462 | 462 | ||
463 | ret = ttm_bo_move_accel_cleanup(&nvbo->bo, fence, NULL, | 463 | ret = ttm_bo_move_accel_cleanup(&nvbo->bo, fence, NULL, |
464 | evict, no_wait_reserve, no_wait_gpu, new_mem); | 464 | evict || (nvbo->channel && |
465 | if (nvbo->channel && nvbo->channel != chan) | 465 | nvbo->channel != chan), |
466 | ret = nouveau_fence_wait(fence, NULL, false, false); | 466 | no_wait_reserve, no_wait_gpu, new_mem); |
467 | nouveau_fence_unref((void *)&fence); | 467 | nouveau_fence_unref((void *)&fence); |
468 | return ret; | 468 | return ret; |
469 | } | 469 | } |
@@ -711,8 +711,7 @@ nouveau_bo_move(struct ttm_buffer_object *bo, bool evict, bool intr, | |||
711 | return ret; | 711 | return ret; |
712 | 712 | ||
713 | /* Software copy if the card isn't up and running yet. */ | 713 | /* Software copy if the card isn't up and running yet. */ |
714 | if (dev_priv->init_state != NOUVEAU_CARD_INIT_DONE || | 714 | if (!dev_priv->channel) { |
715 | !dev_priv->channel) { | ||
716 | ret = ttm_bo_move_memcpy(bo, evict, no_wait_reserve, no_wait_gpu, new_mem); | 715 | ret = ttm_bo_move_memcpy(bo, evict, no_wait_reserve, no_wait_gpu, new_mem); |
717 | goto out; | 716 | goto out; |
718 | } | 717 | } |
@@ -783,7 +782,7 @@ nouveau_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem) | |||
783 | break; | 782 | break; |
784 | case TTM_PL_VRAM: | 783 | case TTM_PL_VRAM: |
785 | mem->bus.offset = mem->mm_node->start << PAGE_SHIFT; | 784 | mem->bus.offset = mem->mm_node->start << PAGE_SHIFT; |
786 | mem->bus.base = drm_get_resource_start(dev, 1); | 785 | mem->bus.base = pci_resource_start(dev->pdev, 1); |
787 | mem->bus.is_iomem = true; | 786 | mem->bus.is_iomem = true; |
788 | break; | 787 | break; |
789 | default: | 788 | default: |