diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-11-14 20:54:21 -0500 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-12-07 22:48:13 -0500 |
commit | 4c1361429841344ce4d164492ee7620cf3286eb7 (patch) | |
tree | 7cd23e9e99299b3265b2e59d49e3aa5b77a465f0 /drivers/gpu/drm/nouveau/nouveau_drv.h | |
parent | f869ef882382a4b6cb42d259e399aeec3781d4bb (diff) |
drm/nv50: implement global channel address space on new VM code
As of this commit, it's guaranteed that if an object is in VRAM that its
GPU virtual address will be constant.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_drv.h')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drv.h | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index 452a8652a49..dce9a5f6f6c 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h | |||
@@ -65,10 +65,6 @@ struct nouveau_vram; | |||
65 | #define NOUVEAU_MAX_CHANNEL_NR 128 | 65 | #define NOUVEAU_MAX_CHANNEL_NR 128 |
66 | #define NOUVEAU_MAX_TILE_NR 15 | 66 | #define NOUVEAU_MAX_TILE_NR 15 |
67 | 67 | ||
68 | #define NV50_VM_MAX_VRAM (2*1024*1024*1024ULL) | ||
69 | #define NV50_VM_BLOCK (512*1024*1024ULL) | ||
70 | #define NV50_VM_VRAM_NR (NV50_VM_MAX_VRAM / NV50_VM_BLOCK) | ||
71 | |||
72 | struct nouveau_vram { | 68 | struct nouveau_vram { |
73 | struct drm_device *dev; | 69 | struct drm_device *dev; |
74 | 70 | ||
@@ -106,6 +102,7 @@ struct nouveau_bo { | |||
106 | 102 | ||
107 | struct nouveau_channel *channel; | 103 | struct nouveau_channel *channel; |
108 | 104 | ||
105 | struct nouveau_vma vma; | ||
109 | bool mappable; | 106 | bool mappable; |
110 | bool no_vm; | 107 | bool no_vm; |
111 | 108 | ||
@@ -252,7 +249,6 @@ struct nouveau_channel { | |||
252 | struct nouveau_vm *vm; | 249 | struct nouveau_vm *vm; |
253 | struct nouveau_gpuobj *vm_pd; | 250 | struct nouveau_gpuobj *vm_pd; |
254 | struct nouveau_gpuobj *vm_gart_pt; | 251 | struct nouveau_gpuobj *vm_gart_pt; |
255 | struct nouveau_gpuobj *vm_vram_pt[NV50_VM_VRAM_NR]; | ||
256 | 252 | ||
257 | /* Objects */ | 253 | /* Objects */ |
258 | struct nouveau_gpuobj *ramin; /* Private instmem */ | 254 | struct nouveau_gpuobj *ramin; /* Private instmem */ |
@@ -712,13 +708,9 @@ struct drm_nouveau_private { | |||
712 | struct nouveau_vm *bar3_vm; | 708 | struct nouveau_vm *bar3_vm; |
713 | 709 | ||
714 | /* G8x/G9x virtual address space */ | 710 | /* G8x/G9x virtual address space */ |
711 | struct nouveau_vm *chan_vm; | ||
715 | uint64_t vm_gart_base; | 712 | uint64_t vm_gart_base; |
716 | uint64_t vm_gart_size; | 713 | uint64_t vm_gart_size; |
717 | uint64_t vm_vram_base; | ||
718 | uint64_t vm_vram_size; | ||
719 | uint64_t vm_end; | ||
720 | struct nouveau_gpuobj *vm_vram_pt[NV50_VM_VRAM_NR]; | ||
721 | int vm_vram_pt_nr; | ||
722 | 714 | ||
723 | struct nvbios vbios; | 715 | struct nvbios vbios; |
724 | 716 | ||
@@ -836,11 +828,6 @@ extern struct nouveau_tile_reg *nv10_mem_set_tiling( | |||
836 | extern void nv10_mem_put_tile_region(struct drm_device *dev, | 828 | extern void nv10_mem_put_tile_region(struct drm_device *dev, |
837 | struct nouveau_tile_reg *tile, | 829 | struct nouveau_tile_reg *tile, |
838 | struct nouveau_fence *fence); | 830 | struct nouveau_fence *fence); |
839 | extern int nv50_mem_vm_bind_linear(struct drm_device *, uint64_t virt, | ||
840 | uint32_t size, uint32_t flags, | ||
841 | uint64_t phys); | ||
842 | extern void nv50_mem_vm_unbind(struct drm_device *, uint64_t virt, | ||
843 | uint32_t size); | ||
844 | extern const struct ttm_mem_type_manager_func nouveau_vram_manager; | 831 | extern const struct ttm_mem_type_manager_func nouveau_vram_manager; |
845 | 832 | ||
846 | /* nouveau_notifier.c */ | 833 | /* nouveau_notifier.c */ |