summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.h
diff options
context:
space:
mode:
authorSunny He <suhe@nvidia.com>2017-07-31 21:54:38 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-08-14 18:55:19 -0400
commit959c02d6757c3c40748f7d2db1515885a5066a12 (patch)
tree58b685a52bc8b543565645227219c1c9609a50b3 /drivers/gpu/nvgpu/gk20a/gk20a.h
parentee60394abc9a52182892ab54554d3e9c841080bf (diff)
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: Ieb87a62f047510e51c52e6563d8e3fd5a65b5f28 Signed-off-by: Sunny He <suhe@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1537753 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index 7b998204..58558159 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -734,16 +734,17 @@ struct gpu_ops {
734 void (*init_inst_block)(struct nvgpu_mem *inst_block, 734 void (*init_inst_block)(struct nvgpu_mem *inst_block,
735 struct vm_gk20a *vm, u32 big_page_size); 735 struct vm_gk20a *vm, u32 big_page_size);
736 bool (*mmu_fault_pending)(struct gk20a *g); 736 bool (*mmu_fault_pending)(struct gk20a *g);
737 /* This function is called to allocate secure memory (memory
738 * that the CPU cannot see). The function should fill the
739 * context buffer descriptor (especially fields destroy, sgt,
740 * size).
741 */
742 int (*secure_alloc)(struct gk20a *g,
743 struct gr_ctx_buffer_desc *desc,
744 size_t size);
745 void (*fault_info_mem_destroy)(struct gk20a *g); 737 void (*fault_info_mem_destroy)(struct gk20a *g);
746 } mm; 738 } mm;
739 /*
740 * This function is called to allocate secure memory (memory
741 * that the CPU cannot see). The function should fill the
742 * context buffer descriptor (especially fields destroy, sgt,
743 * size).
744 */
745 int (*secure_alloc)(struct gk20a *g,
746 struct gr_ctx_buffer_desc *desc,
747 size_t size);
747 struct { 748 struct {
748 u32 (*enter)(struct gk20a *g, struct nvgpu_mem *mem, 749 u32 (*enter)(struct gk20a *g, struct nvgpu_mem *mem,
749 struct page_alloc_chunk *chunk, u32 w); 750 struct page_alloc_chunk *chunk, u32 w);