From 8ab6445df5b24c200ac4e346684119a85008e0e3 Mon Sep 17 00:00:00 2001 From: Sunny He Date: Wed, 26 Jul 2017 14:23:01 -0700 Subject: gpu: nvgpu: Reorg mm HAL initialization Reorganize HAL initialization to remove inheritance and construct the gpu_ops struct at compile time. This patch only covers the mm sub-module of the gpu_ops struct. Perform HAL function assignments in hal_gxxxx.c through the population of a chip-specific copy of gpu_ops. Jira NVGPU-74 Change-Id: I5fd295c6473d5b4a6178c0c6be8fcf8f4c33f2e3 Signed-off-by: Sunny He Reviewed-on: https://git-master.nvidia.com/r/1537754 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gv11b/mm_gv11b.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gv11b/mm_gv11b.h') diff --git a/drivers/gpu/nvgpu/gv11b/mm_gv11b.h b/drivers/gpu/nvgpu/gv11b/mm_gv11b.h index a887c7f4..12f0fe63 100644 --- a/drivers/gpu/nvgpu/gv11b/mm_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/mm_gv11b.h @@ -18,7 +18,20 @@ #define HW_FAULT_BUF_STATUS_ALLOC_TRUE 1 #define HW_FAULT_BUF_STATUS_ALLOC_FALSE 0 -struct gpu_ops; +struct gk20a; +struct nvgpu_mem; +struct vm_gk20a; + +bool gv11b_mm_is_bar1_supported(struct gk20a *g); +void gv11b_init_inst_block(struct nvgpu_mem *inst_block, + struct vm_gk20a *vm, u32 big_page_size); +bool gv11b_mm_mmu_fault_pending(struct gk20a *g); +void gv11b_mm_remove_bar2_vm(struct gk20a *g); +int gv11b_init_mm_setup_hw(struct gk20a *g); +int gv11b_init_bar2_mm_hw_setup(struct gk20a *g); +void gv11b_mm_l2_flush(struct gk20a *g, bool invalidate); +u64 gv11b_gpu_phys_addr(struct gk20a *g, + struct nvgpu_gmmu_attrs *attrs, u64 phys); +void gv11b_mm_fault_info_mem_destroy(struct gk20a *g); -void gv11b_init_mm(struct gpu_ops *gops); #endif -- cgit v1.2.2