Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 371576
b: refs/heads/master
c: de7b7d5
h: refs/heads/master
v: v3
  • Loading branch information
Ben Skeggs committed Apr 26, 2013
1 parent 9b51c8e commit def4b33
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7092a8dd5c16c32746444bcd468b429185c25472
refs/heads/master: de7b7d59d54852c9544a9e4fa7af719511fb5366
16 changes: 16 additions & 0 deletions trunk/drivers/gpu/drm/nouveau/nouveau_ttm.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ nouveau_gart_manager_new(struct ttm_mem_type_manager *man,
struct ttm_placement *placement,
struct ttm_mem_reg *mem)
{
struct nouveau_drm *drm = nouveau_bdev(bo->bdev);
struct nouveau_bo *nvbo = nouveau_bo(bo);
struct nouveau_mem *node;

if (unlikely((mem->num_pages << PAGE_SHIFT) >= 512 * 1024 * 1024))
Expand All @@ -174,6 +176,20 @@ nouveau_gart_manager_new(struct ttm_mem_type_manager *man,
return -ENOMEM;
node->page_shift = 12;

switch (nv_device(drm->device)->card_type) {
case NV_50:
if (nv_device(drm->device)->chipset != 0x50)
node->memtype = (nvbo->tile_flags & 0x7f00) >> 8;
break;
case NV_C0:
case NV_D0:
case NV_E0:
node->memtype = (nvbo->tile_flags & 0xff00) >> 8;
break;
default:
break;
}

mem->mm_node = node;
mem->start = 0;
return 0;
Expand Down

0 comments on commit def4b33

Please sign in to comment.