diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-02-09 21:22:52 -0500 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-02-24 15:45:55 -0500 |
commit | d5f423947a11103c43ad26ebb680d049c2d8edd6 (patch) | |
tree | 8ca591a7ea0de3c957f34d0e63f8b9f0a5addaa0 /drivers/gpu/drm/nouveau/nouveau_bo.c | |
parent | b5e2f0769a64046cefbfc307cbe6f7fa40dddf10 (diff) |
drm/nouveau: rename nouveau_vram to nouveau_mem
This structure will also be used for GART in the near future.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_bo.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bo.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 4e74957ef2cf..dcb1d72f3dd8 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c | |||
@@ -509,7 +509,7 @@ nvc0_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, | |||
509 | 509 | ||
510 | src_offset = old_mem->start << PAGE_SHIFT; | 510 | src_offset = old_mem->start << PAGE_SHIFT; |
511 | if (old_mem->mem_type == TTM_PL_VRAM) { | 511 | if (old_mem->mem_type == TTM_PL_VRAM) { |
512 | struct nouveau_vram *node = old_mem->mm_node; | 512 | struct nouveau_mem *node = old_mem->mm_node; |
513 | src_offset = node->tmp_vma.offset; | 513 | src_offset = node->tmp_vma.offset; |
514 | } else { | 514 | } else { |
515 | src_offset += dev_priv->gart_info.aper_base; | 515 | src_offset += dev_priv->gart_info.aper_base; |
@@ -562,7 +562,7 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, | |||
562 | 562 | ||
563 | src_offset = old_mem->start << PAGE_SHIFT; | 563 | src_offset = old_mem->start << PAGE_SHIFT; |
564 | if (old_mem->mem_type == TTM_PL_VRAM) { | 564 | if (old_mem->mem_type == TTM_PL_VRAM) { |
565 | struct nouveau_vram *node = old_mem->mm_node; | 565 | struct nouveau_mem *node = old_mem->mm_node; |
566 | src_offset = node->tmp_vma.offset; | 566 | src_offset = node->tmp_vma.offset; |
567 | } else { | 567 | } else { |
568 | src_offset += dev_priv->gart_info.aper_base; | 568 | src_offset += dev_priv->gart_info.aper_base; |
@@ -729,7 +729,7 @@ nouveau_bo_move_m2mf(struct ttm_buffer_object *bo, int evict, bool intr, | |||
729 | * up after ttm destroys the ttm_mem_reg | 729 | * up after ttm destroys the ttm_mem_reg |
730 | */ | 730 | */ |
731 | if (dev_priv->card_type >= NV_50 && old_mem->mem_type == TTM_PL_VRAM) { | 731 | if (dev_priv->card_type >= NV_50 && old_mem->mem_type == TTM_PL_VRAM) { |
732 | struct nouveau_vram *node = old_mem->mm_node; | 732 | struct nouveau_mem *node = old_mem->mm_node; |
733 | 733 | ||
734 | ret = nouveau_vm_get(chan->vm, old_mem->num_pages << PAGE_SHIFT, | 734 | ret = nouveau_vm_get(chan->vm, old_mem->num_pages << PAGE_SHIFT, |
735 | nvbo->vma.node->type, NV_MEM_ACCESS_RO, | 735 | nvbo->vma.node->type, NV_MEM_ACCESS_RO, |
@@ -972,7 +972,7 @@ nouveau_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem) | |||
972 | break; | 972 | break; |
973 | case TTM_PL_VRAM: | 973 | case TTM_PL_VRAM: |
974 | { | 974 | { |
975 | struct nouveau_vram *vram = mem->mm_node; | 975 | struct nouveau_mem *node = mem->mm_node; |
976 | u8 page_shift; | 976 | u8 page_shift; |
977 | 977 | ||
978 | if (!dev_priv->bar1_vm) { | 978 | if (!dev_priv->bar1_vm) { |
@@ -983,23 +983,23 @@ nouveau_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem) | |||
983 | } | 983 | } |
984 | 984 | ||
985 | if (dev_priv->card_type == NV_C0) | 985 | if (dev_priv->card_type == NV_C0) |
986 | page_shift = vram->page_shift; | 986 | page_shift = node->page_shift; |
987 | else | 987 | else |
988 | page_shift = 12; | 988 | page_shift = 12; |
989 | 989 | ||
990 | ret = nouveau_vm_get(dev_priv->bar1_vm, mem->bus.size, | 990 | ret = nouveau_vm_get(dev_priv->bar1_vm, mem->bus.size, |
991 | page_shift, NV_MEM_ACCESS_RW, | 991 | page_shift, NV_MEM_ACCESS_RW, |
992 | &vram->bar_vma); | 992 | &node->bar_vma); |
993 | if (ret) | 993 | if (ret) |
994 | return ret; | 994 | return ret; |
995 | 995 | ||
996 | nouveau_vm_map(&vram->bar_vma, vram); | 996 | nouveau_vm_map(&node->bar_vma, node); |
997 | if (ret) { | 997 | if (ret) { |
998 | nouveau_vm_put(&vram->bar_vma); | 998 | nouveau_vm_put(&node->bar_vma); |
999 | return ret; | 999 | return ret; |
1000 | } | 1000 | } |
1001 | 1001 | ||
1002 | mem->bus.offset = vram->bar_vma.offset; | 1002 | mem->bus.offset = node->bar_vma.offset; |
1003 | if (dev_priv->card_type == NV_50) /*XXX*/ | 1003 | if (dev_priv->card_type == NV_50) /*XXX*/ |
1004 | mem->bus.offset -= 0x0020000000ULL; | 1004 | mem->bus.offset -= 0x0020000000ULL; |
1005 | mem->bus.base = pci_resource_start(dev->pdev, 1); | 1005 | mem->bus.base = pci_resource_start(dev->pdev, 1); |
@@ -1016,16 +1016,16 @@ static void | |||
1016 | nouveau_ttm_io_mem_free(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem) | 1016 | nouveau_ttm_io_mem_free(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem) |
1017 | { | 1017 | { |
1018 | struct drm_nouveau_private *dev_priv = nouveau_bdev(bdev); | 1018 | struct drm_nouveau_private *dev_priv = nouveau_bdev(bdev); |
1019 | struct nouveau_vram *vram = mem->mm_node; | 1019 | struct nouveau_mem *node = mem->mm_node; |
1020 | 1020 | ||
1021 | if (!dev_priv->bar1_vm || mem->mem_type != TTM_PL_VRAM) | 1021 | if (!dev_priv->bar1_vm || mem->mem_type != TTM_PL_VRAM) |
1022 | return; | 1022 | return; |
1023 | 1023 | ||
1024 | if (!vram->bar_vma.node) | 1024 | if (!node->bar_vma.node) |
1025 | return; | 1025 | return; |
1026 | 1026 | ||
1027 | nouveau_vm_unmap(&vram->bar_vma); | 1027 | nouveau_vm_unmap(&node->bar_vma); |
1028 | nouveau_vm_put(&vram->bar_vma); | 1028 | nouveau_vm_put(&node->bar_vma); |
1029 | } | 1029 | } |
1030 | 1030 | ||
1031 | static int | 1031 | static int |