Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282495
b: refs/heads/master
c: dc97b34
h: refs/heads/master
i:
  282493: d2c1000
  282491: 8884414
  282487: 59626b3
  282479: c311d0a
  282463: 9fd3191
  282431: 36ff567
  282367: 77eaa2a
v: v3
  • Loading branch information
Jerome Glisse authored and Dave Airlie committed Dec 6, 2011
1 parent 96b7145 commit d5d2e7a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 57de4ba959b290f0b8cf36ecd5e7f1b29d4b8a12
refs/heads/master: dc97b3409a790d2a21aac6e5cdb99558b5944119
4 changes: 2 additions & 2 deletions trunk/drivers/gpu/drm/nouveau/nouveau_bo.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,10 +815,10 @@ nouveau_bo_move_ntfy(struct ttm_buffer_object *bo, struct ttm_mem_reg *new_mem)
struct nouveau_vma *vma;

list_for_each_entry(vma, &nvbo->vma_list, head) {
if (new_mem->mem_type == TTM_PL_VRAM) {
if (new_mem && new_mem->mem_type == TTM_PL_VRAM) {
nouveau_vm_map(vma, new_mem->mm_node);
} else
if (new_mem->mem_type == TTM_PL_TT &&
if (new_mem && new_mem->mem_type == TTM_PL_TT &&
nvbo->page_shift == vma->vm->spg_shift) {
nouveau_vm_map_sg(vma, 0, new_mem->
num_pages << PAGE_SHIFT,
Expand Down
9 changes: 6 additions & 3 deletions trunk/drivers/gpu/drm/ttm/ttm_bo.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,9 +404,6 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
}
}

if (bdev->driver->move_notify)
bdev->driver->move_notify(bo, mem);

if (!(old_man->flags & TTM_MEMTYPE_FLAG_FIXED) &&
!(new_man->flags & TTM_MEMTYPE_FLAG_FIXED))
ret = ttm_bo_move_ttm(bo, evict, no_wait_reserve, no_wait_gpu, mem);
Expand All @@ -419,6 +416,9 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
if (ret)
goto out_err;

if (bdev->driver->move_notify)
bdev->driver->move_notify(bo, mem);

moved:
if (bo->evicted) {
ret = bdev->driver->invalidate_caches(bdev, bo->mem.placement);
Expand Down Expand Up @@ -457,6 +457,9 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,

static void ttm_bo_cleanup_memtype_use(struct ttm_buffer_object *bo)
{
if (bo->bdev->driver->move_notify)
bo->bdev->driver->move_notify(bo, NULL);

if (bo->ttm) {
ttm_tt_unbind(bo->ttm);
ttm_tt_destroy(bo->ttm);
Expand Down

0 comments on commit d5d2e7a

Please sign in to comment.