From b07a304ba3e747c80fe3e0a16caec88c8e1e8b28 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Tue, 10 Jul 2018 09:54:10 -0700 Subject: gpu: nvgpu: Use HAL for calls from MM to FB mm_gv11b.c has several direct calls to fb_gv11b.h. Redirect them to go via a HAL. Also make sure the HALs are using parameter with correct signedness and prefix the parameter constants with NVGPU_FB_MMU_. MMU buffer table indices were also defined in fb_gv11b.h, even though the tables themselves are defined in include/nvgpu/mm.h. Move the indices to include/nvgpu/mm.h and prefix them with NVGPU_MM_MMU_. JIRA NVGPU-714 Change-Id: Ieeae7c5664b8f53f8313cfad0a771d14637caa08 Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1776131 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gv11b/fb_gv11b.h | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'drivers/gpu/nvgpu/gv11b/fb_gv11b.h') diff --git a/drivers/gpu/nvgpu/gv11b/fb_gv11b.h b/drivers/gpu/nvgpu/gv11b/fb_gv11b.h index 34988bd2..fe2c733d 100644 --- a/drivers/gpu/nvgpu/gv11b/fb_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/fb_gv11b.h @@ -28,15 +28,6 @@ #define NONREPLAY_REG_INDEX 0 #define REPLAY_REG_INDEX 1 -#define FAULT_BUF_DISABLED 0 -#define FAULT_BUF_ENABLED 1 - -#define FAULT_BUF_INVALID 0 -#define FAULT_BUF_VALID 1 - -#define FAULT_TYPE_OTHER_AND_NONREPLAY 0 -#define FAULT_TYPE_REPLAY 1 - struct gk20a; void gv11b_fb_init_hw(struct gk20a *g); @@ -46,11 +37,10 @@ void gv11b_fb_init_cbc(struct gk20a *g, struct gr_gk20a *gr); void gv11b_fb_reset(struct gk20a *g); void gv11b_fb_hub_isr(struct gk20a *g); -u32 gv11b_fb_is_fault_buf_enabled(struct gk20a *g, - unsigned int index); +bool gv11b_fb_is_fault_buf_enabled(struct gk20a *g, u32 index ); void gv11b_fb_fault_buf_set_state_hw(struct gk20a *g, - unsigned int index, unsigned int state); -void gv11b_fb_fault_buf_configure_hw(struct gk20a *g, unsigned int index); + u32 index, u32 state); +void gv11b_fb_fault_buf_configure_hw(struct gk20a *g, u32 index); void gv11b_fb_enable_hub_intr(struct gk20a *g); void gv11b_fb_disable_hub_intr(struct gk20a *g); bool gv11b_fb_mmu_fault_pending(struct gk20a *g); @@ -58,7 +48,7 @@ void gv11b_fb_handle_dropped_mmu_fault(struct gk20a *g, u32 fault_status); void gv11b_fb_handle_other_fault_notify(struct gk20a *g, u32 fault_status); void gv11b_fb_handle_mmu_nonreplay_replay_fault(struct gk20a *g, - u32 fault_status, unsigned int index); + u32 fault_status, u32 index); void gv11b_fb_handle_nonreplay_fault_overflow(struct gk20a *g, u32 fault_status); void gv11b_fb_handle_replay_fault_overflow(struct gk20a *g, -- cgit v1.2.2