summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b/fb_gv11b.h
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2018-07-10 12:54:10 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-07-12 23:44:04 -0400
commitb07a304ba3e747c80fe3e0a16caec88c8e1e8b28 (patch)
tree7c800fa3ae75c1d33f806b4e1d6f522173801f44 /drivers/gpu/nvgpu/gv11b/fb_gv11b.h
parent96d4842c0dbae051258408480b981ed034163c13 (diff)
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 <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1776131 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/fb_gv11b.h')
-rw-r--r--drivers/gpu/nvgpu/gv11b/fb_gv11b.h18
1 files changed, 4 insertions, 14 deletions
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 @@
28#define NONREPLAY_REG_INDEX 0 28#define NONREPLAY_REG_INDEX 0
29#define REPLAY_REG_INDEX 1 29#define REPLAY_REG_INDEX 1
30 30
31#define FAULT_BUF_DISABLED 0
32#define FAULT_BUF_ENABLED 1
33
34#define FAULT_BUF_INVALID 0
35#define FAULT_BUF_VALID 1
36
37#define FAULT_TYPE_OTHER_AND_NONREPLAY 0
38#define FAULT_TYPE_REPLAY 1
39
40struct gk20a; 31struct gk20a;
41 32
42void gv11b_fb_init_hw(struct gk20a *g); 33void gv11b_fb_init_hw(struct gk20a *g);
@@ -46,11 +37,10 @@ void gv11b_fb_init_cbc(struct gk20a *g, struct gr_gk20a *gr);
46void gv11b_fb_reset(struct gk20a *g); 37void gv11b_fb_reset(struct gk20a *g);
47void gv11b_fb_hub_isr(struct gk20a *g); 38void gv11b_fb_hub_isr(struct gk20a *g);
48 39
49u32 gv11b_fb_is_fault_buf_enabled(struct gk20a *g, 40bool gv11b_fb_is_fault_buf_enabled(struct gk20a *g, u32 index );
50 unsigned int index);
51void gv11b_fb_fault_buf_set_state_hw(struct gk20a *g, 41void gv11b_fb_fault_buf_set_state_hw(struct gk20a *g,
52 unsigned int index, unsigned int state); 42 u32 index, u32 state);
53void gv11b_fb_fault_buf_configure_hw(struct gk20a *g, unsigned int index); 43void gv11b_fb_fault_buf_configure_hw(struct gk20a *g, u32 index);
54void gv11b_fb_enable_hub_intr(struct gk20a *g); 44void gv11b_fb_enable_hub_intr(struct gk20a *g);
55void gv11b_fb_disable_hub_intr(struct gk20a *g); 45void gv11b_fb_disable_hub_intr(struct gk20a *g);
56bool gv11b_fb_mmu_fault_pending(struct gk20a *g); 46bool 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);
58void gv11b_fb_handle_other_fault_notify(struct gk20a *g, 48void gv11b_fb_handle_other_fault_notify(struct gk20a *g,
59 u32 fault_status); 49 u32 fault_status);
60void gv11b_fb_handle_mmu_nonreplay_replay_fault(struct gk20a *g, 50void gv11b_fb_handle_mmu_nonreplay_replay_fault(struct gk20a *g,
61 u32 fault_status, unsigned int index); 51 u32 fault_status, u32 index);
62void gv11b_fb_handle_nonreplay_fault_overflow(struct gk20a *g, 52void gv11b_fb_handle_nonreplay_fault_overflow(struct gk20a *g,
63 u32 fault_status); 53 u32 fault_status);
64void gv11b_fb_handle_replay_fault_overflow(struct gk20a *g, 54void gv11b_fb_handle_replay_fault_overflow(struct gk20a *g,