Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218193
b: refs/heads/master
c: e1429b4
h: refs/heads/master
i:
  218191: 1a041aa
v: v3
  • Loading branch information
Ben Skeggs committed Sep 24, 2010
1 parent aac576c commit ef5dfc6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 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: c16c570762bb4419f2bb764f2a7428c249d905d0
refs/heads/master: e1429b4c3c79512f0e1a44d9d895c1db52b8c42f
23 changes: 20 additions & 3 deletions trunk/drivers/gpu/drm/nouveau/nouveau_bo.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ nouveau_bo_new(struct drm_device *dev, struct nouveau_channel *chan,
nouveau_bo_fixup_align(dev, tile_mode, tile_flags, &align, &size);
align >>= PAGE_SHIFT;

nvbo->placement.fpfn = 0;
nvbo->placement.lpfn = mappable ? dev_priv->fb_mappable_pages : 0;
nouveau_bo_placement_set(nvbo, flags, 0);

nvbo->channel = chan;
Expand Down Expand Up @@ -907,7 +905,26 @@ nouveau_ttm_io_mem_free(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem)
static int
nouveau_ttm_fault_reserve_notify(struct ttm_buffer_object *bo)
{
return 0;
struct drm_nouveau_private *dev_priv = nouveau_bdev(bo->bdev);
struct nouveau_bo *nvbo = nouveau_bo(bo);

/* as long as the bo isn't in vram, and isn't tiled, we've got
* nothing to do here.
*/
if (bo->mem.mem_type != TTM_PL_VRAM) {
if (dev_priv->chipset < NV_50 || !nvbo->tile_flags)
return 0;
}

/* make sure bo is in mappable vram */
if (bo->mem.mm_node->start + bo->mem.num_pages < dev_priv->fb_mappable_pages)
return 0;


nvbo->placement.fpfn = 0;
nvbo->placement.lpfn = dev_priv->fb_mappable_pages;
nouveau_bo_placement_set(nvbo, TTM_PL_VRAM, 0);
return ttm_bo_validate(bo, &nvbo->placement, false, true, false);
}

struct ttm_bo_driver nouveau_bo_driver = {
Expand Down

0 comments on commit ef5dfc6

Please sign in to comment.