summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2016-06-17 08:51:02 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-07-05 02:10:59 -0400
commite12c5c8594c429357427130389da632284d79bcc (patch)
tree453043237ef411370a02ec03c6857b63480c019b /drivers/gpu/nvgpu/gk20a/mm_gk20a.h
parentcd5a1dc315abd0a7db4136ee0e6b0c03f0882937 (diff)
gpu: nvgpu: initial support for vidmem apertures
add gk20a_aperture_mask() for memory target selection now that buffers can actually be allocated from vidmem, and use it in all cases that have a mem_desc available. Jira DNVGPU-76 Change-Id: I4353cdc6e1e79488f0875581cfaf2a5cfb8c976a Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: http://git-master/r/1169306 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
index 7bb4d011..7d3b371c 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
@@ -600,6 +600,11 @@ static inline phys_addr_t gk20a_mem_phys(struct mem_desc *mem)
600 return 0; 600 return 0;
601} 601}
602 602
603u32 __gk20a_aperture_mask(struct gk20a *g, enum gk20a_aperture aperture,
604 u32 sysmem_mask, u32 vidmem_mask);
605u32 gk20a_aperture_mask(struct gk20a *g, struct mem_desc *mem,
606 u32 sysmem_mask, u32 vidmem_mask);
607
603u64 gk20a_locked_gmmu_map(struct vm_gk20a *vm, 608u64 gk20a_locked_gmmu_map(struct vm_gk20a *vm,
604 u64 map_offset, 609 u64 map_offset,
605 struct sg_table *sgt, 610 struct sg_table *sgt,
@@ -767,7 +772,8 @@ struct gpu_ops;
767void gk20a_init_mm(struct gpu_ops *gops); 772void gk20a_init_mm(struct gpu_ops *gops);
768const struct gk20a_mmu_level *gk20a_mm_get_mmu_levels(struct gk20a *g, 773const struct gk20a_mmu_level *gk20a_mm_get_mmu_levels(struct gk20a *g,
769 u32 big_page_size); 774 u32 big_page_size);
770void gk20a_mm_init_pdb(struct gk20a *g, struct mem_desc *mem, u64 pdb_addr); 775void gk20a_mm_init_pdb(struct gk20a *g, struct mem_desc *mem,
776 struct vm_gk20a *vm);
771 777
772void gk20a_remove_vm(struct vm_gk20a *vm, struct mem_desc *inst_block); 778void gk20a_remove_vm(struct vm_gk20a *vm, struct mem_desc *inst_block);
773 779