summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b/fb_gv11b.h
diff options
context:
space:
mode:
authorSeema Khowala <seemaj@nvidia.com>2017-06-02 12:58:23 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-07-08 14:35:48 -0400
commitaa05648fd6038b69d1ed841f33b24cf1875efd83 (patch)
tree8e9ee6c0f7b937f85b2caa4db70aebcd1e619944 /drivers/gpu/nvgpu/gv11b/fb_gv11b.h
parentcf33b6c26bd054f5fe09be78ed754049821a8737 (diff)
gpu: nvgpu: gv11b: set up for enabling/handling hub intr
-implement mm ops init_mm_setup_hw This will also call *fault*setup* that will do s/w and h/w set up required to get mmu fault info -implement s/w set up for copying mmu faults Two shadow fault buffers are pre allocated which will be used to copy fault info. One for copying from fault snap registers/nonreplayable h/w fault buffers and one for replay h/w fault buffers -implement s/w set up for buffering mmu faults Replayable/Non-replayable fault buffers are mapped in BAR2 virtual/physical address space. These buffers are circular buffers in terms of address calculation. Currently there are num host channels buffers -configure h/w for buffering mmu faults if s/w set up is successful, configure h/w registers to enable buffered mode of mmu faults -if both s/w and h/w set up are successful, enable corresponding hub interrupts -implement new ops, fault_info_buf_deinit This will be called during gk20a_mm_destroy to disable hub intr and de-allocate shadow fault buf that is used to copy mmu fault info during mmu fault handling -implement mm ops remove_bar2_vm This will also unmap and free fault buffers mapped in BAR2 if fault buffers were allocated JIRA GPUT19X-7 JIRA GPUT19X-12 Change-Id: I53a38eddbb0a50a1f2024600583f2aae1f1fba6d Signed-off-by: Seema Khowala <seemaj@nvidia.com> Reviewed-on: https://git-master/r/1492682 Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/fb_gv11b.h')
-rw-r--r--drivers/gpu/nvgpu/gv11b/fb_gv11b.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/fb_gv11b.h b/drivers/gpu/nvgpu/gv11b/fb_gv11b.h
index eff3c25d..d8f5e145 100644
--- a/drivers/gpu/nvgpu/gv11b/fb_gv11b.h
+++ b/drivers/gpu/nvgpu/gv11b/fb_gv11b.h
@@ -40,9 +40,19 @@ struct gpu_ops;
40 HUB_INTR_TYPE_ECC_UNCORRECTED | \ 40 HUB_INTR_TYPE_ECC_UNCORRECTED | \
41 HUB_INTR_TYPE_ACCESS_COUNTER) 41 HUB_INTR_TYPE_ACCESS_COUNTER)
42 42
43#define FAULT_TYPE_OTHER_AND_NONREPLAY 0
44#define FAULT_TYPE_REPLAY 1
45
46void gv11b_init_fb(struct gpu_ops *gops);
47u32 gv11b_fb_is_fault_buf_enabled(struct gk20a *g,
48 unsigned int index);
49void gv11b_fb_fault_buf_set_state_hw(struct gk20a *g,
50 unsigned int index, unsigned int state);
51void gv11b_fb_nonreplay_fault_buf_configure_hw(struct gk20a *g);
43void gv11b_fb_enable_hub_intr(struct gk20a *g, 52void gv11b_fb_enable_hub_intr(struct gk20a *g,
44 unsigned int index, unsigned int intr_type); 53 unsigned int index, unsigned int intr_type);
45void gv11b_fb_disable_hub_intr(struct gk20a *g, 54void gv11b_fb_disable_hub_intr(struct gk20a *g,
46 unsigned int index, unsigned int intr_type); 55 unsigned int index, unsigned int intr_type);
47void gv11b_init_fb(struct gpu_ops *gops); 56void gv11b_fb_fault_buf_configure_hw(struct gk20a *g, unsigned int index);
57bool gv11b_fb_mmu_fault_pending(struct gk20a *g);
48#endif 58#endif