From ca762e42205febba72ce063417e1ac598610941d Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Wed, 15 Mar 2017 14:08:32 -0700 Subject: gpu: nvgpu: Move all FB programming to FB HAL Move all programming of FB to fb_*.c files, and remove the inclusion of FB hardware headers from other files. TLB invalidate function took previously a pointer to VM, but the new API takes only a PDB mem_desc, because FB does not need to know about higher level VM. GPC MMU is programmed from the same function as FB MMU, so added dependency to GR hardware header to FB. GP106 ACR was also triggering a VPR fetch, but that's not applicable to dGPU, so removed that call. Change-Id: I4eb69377ac3745da205907626cf60948b7c5392a Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1321516 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 695d2d1a..73123fa9 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -349,6 +349,7 @@ struct gpu_ops { } gr; const char *name; struct { + void (*init_hw)(struct gk20a *g); void (*init_fs_state)(struct gk20a *g); void (*reset)(struct gk20a *g); void (*init_uncompressed_kind_map)(struct gk20a *g); @@ -358,6 +359,10 @@ struct gpu_ops { unsigned int (*compression_page_size)(struct gk20a *g); unsigned int (*compressible_page_size)(struct gk20a *g); void (*dump_vpr_wpr_info)(struct gk20a *g); + int (*vpr_info_fetch)(struct gk20a *g); + bool (*is_debug_mode_enabled)(struct gk20a *g); + void (*set_debug_mode)(struct gk20a *g, bool enable); + void (*tlb_invalidate)(struct gk20a *g, struct mem_desc *pdb); } fb; struct { void (*slcg_bus_load_gating_prod)(struct gk20a *g, bool prod); @@ -573,8 +578,6 @@ struct gpu_ops { } fecs_trace; struct { bool (*support_sparse)(struct gk20a *g); - bool (*is_debug_mode_enabled)(struct gk20a *g); - void (*set_debug_mode)(struct gk20a *g, bool enable); u64 (*gmmu_map)(struct vm_gk20a *vm, u64 map_offset, struct sg_table *sgt, @@ -607,7 +610,6 @@ struct gpu_ops { void (*l2_invalidate)(struct gk20a *g); void (*l2_flush)(struct gk20a *g, bool invalidate); void (*cbc_clean)(struct gk20a *g); - void (*tlb_invalidate)(struct vm_gk20a *vm); void (*set_big_page_size)(struct gk20a *g, struct mem_desc *mem, int size); u32 (*get_big_page_sizes)(void); -- cgit v1.2.2