summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv100/fb_gv100.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2018-07-03 17:00:40 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-07-11 04:43:26 -0400
commita801c897df1e5e7ac498e1531ce4bbdabdca1c3d (patch)
treec461329d88878803636a268844a7a05acc2ae1d5 /drivers/gpu/nvgpu/gv100/fb_gv100.c
parent572fba2c52a6d63dbc785b48ad845e55f0b7eac0 (diff)
gpu: nvgpu: Simplify FB hub intr enable
Hard code flags for enabling and disabling FB hub interrupts. JIRA NVGPU-714 Change-Id: I806ef443cb9e27e221d407d633ca91d8fb40d075 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1769853 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv100/fb_gv100.c')
-rw-r--r--drivers/gpu/nvgpu/gv100/fb_gv100.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gv100/fb_gv100.c b/drivers/gpu/nvgpu/gv100/fb_gv100.c
index defb6642..1889268f 100644
--- a/drivers/gpu/nvgpu/gv100/fb_gv100.c
+++ b/drivers/gpu/nvgpu/gv100/fb_gv100.c
@@ -70,6 +70,34 @@ void gv100_fb_reset(struct gk20a *g)
70 gk20a_writel(g, fb_mmu_priv_level_mask_r(), val); 70 gk20a_writel(g, fb_mmu_priv_level_mask_r(), val);
71} 71}
72 72
73void gv100_fb_enable_hub_intr(struct gk20a *g)
74{
75 u32 mask = 0;
76
77 mask = fb_niso_intr_en_set_mmu_other_fault_notify_m() |
78 fb_niso_intr_en_set_mmu_nonreplayable_fault_notify_m() |
79 fb_niso_intr_en_set_mmu_nonreplayable_fault_overflow_m() |
80 fb_niso_intr_en_set_mmu_replayable_fault_notify_m() |
81 fb_niso_intr_en_set_mmu_replayable_fault_overflow_m();
82
83 gk20a_writel(g, fb_niso_intr_en_set_r(0),
84 mask);
85}
86
87void gv100_fb_disable_hub_intr(struct gk20a *g)
88{
89 u32 mask = 0;
90
91 mask = fb_niso_intr_en_set_mmu_other_fault_notify_m() |
92 fb_niso_intr_en_set_mmu_nonreplayable_fault_notify_m() |
93 fb_niso_intr_en_set_mmu_nonreplayable_fault_overflow_m() |
94 fb_niso_intr_en_set_mmu_replayable_fault_notify_m() |
95 fb_niso_intr_en_set_mmu_replayable_fault_overflow_m();
96
97 gk20a_writel(g, fb_niso_intr_en_clr_r(0),
98 mask);
99}
100
73int gv100_fb_memory_unlock(struct gk20a *g) 101int gv100_fb_memory_unlock(struct gk20a *g)
74{ 102{
75 struct nvgpu_firmware *mem_unlock_fw = NULL; 103 struct nvgpu_firmware *mem_unlock_fw = NULL;