diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2018-07-03 17:00:40 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-07-11 04:43:26 -0400 |
commit | a801c897df1e5e7ac498e1531ce4bbdabdca1c3d (patch) | |
tree | c461329d88878803636a268844a7a05acc2ae1d5 /drivers/gpu/nvgpu/gv100 | |
parent | 572fba2c52a6d63dbc785b48ad845e55f0b7eac0 (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')
-rw-r--r-- | drivers/gpu/nvgpu/gv100/fb_gv100.c | 28 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv100/fb_gv100.h | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv100/hal_gv100.c | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv100/mc_gv100.c | 4 |
4 files changed, 33 insertions, 7 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 | ||
73 | void 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 | |||
87 | void 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 | |||
73 | int gv100_fb_memory_unlock(struct gk20a *g) | 101 | int 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; |
diff --git a/drivers/gpu/nvgpu/gv100/fb_gv100.h b/drivers/gpu/nvgpu/gv100/fb_gv100.h index 5b99fe5e..195baccf 100644 --- a/drivers/gpu/nvgpu/gv100/fb_gv100.h +++ b/drivers/gpu/nvgpu/gv100/fb_gv100.h | |||
@@ -28,6 +28,8 @@ | |||
28 | struct gk20a; | 28 | struct gk20a; |
29 | 29 | ||
30 | void gv100_fb_reset(struct gk20a *g); | 30 | void gv100_fb_reset(struct gk20a *g); |
31 | void gv100_fb_enable_hub_intr(struct gk20a *g); | ||
32 | void gv100_fb_disable_hub_intr(struct gk20a *g); | ||
31 | int gv100_fb_memory_unlock(struct gk20a *g); | 33 | int gv100_fb_memory_unlock(struct gk20a *g); |
32 | int gv100_fb_init_nvlink(struct gk20a *g); | 34 | int gv100_fb_init_nvlink(struct gk20a *g); |
33 | int gv100_fb_enable_nvlink(struct gk20a *g); | 35 | int gv100_fb_enable_nvlink(struct gk20a *g); |
diff --git a/drivers/gpu/nvgpu/gv100/hal_gv100.c b/drivers/gpu/nvgpu/gv100/hal_gv100.c index 3cfda7ca..ea131822 100644 --- a/drivers/gpu/nvgpu/gv100/hal_gv100.c +++ b/drivers/gpu/nvgpu/gv100/hal_gv100.c | |||
@@ -459,7 +459,7 @@ static const struct gpu_ops gv100_ops = { | |||
459 | }, | 459 | }, |
460 | .fb = { | 460 | .fb = { |
461 | .reset = gv100_fb_reset, | 461 | .reset = gv100_fb_reset, |
462 | .init_hw = gk20a_fb_init_hw, | 462 | .init_hw = gv11b_fb_init_hw, |
463 | .init_fs_state = NULL, | 463 | .init_fs_state = NULL, |
464 | .set_mmu_page_size = gm20b_fb_set_mmu_page_size, | 464 | .set_mmu_page_size = gm20b_fb_set_mmu_page_size, |
465 | .set_use_full_comp_tag_line = | 465 | .set_use_full_comp_tag_line = |
@@ -481,8 +481,8 @@ static const struct gpu_ops gv100_ops = { | |||
481 | .mem_unlock = gv100_fb_memory_unlock, | 481 | .mem_unlock = gv100_fb_memory_unlock, |
482 | .init_nvlink = gv100_fb_init_nvlink, | 482 | .init_nvlink = gv100_fb_init_nvlink, |
483 | .enable_nvlink = gv100_fb_enable_nvlink, | 483 | .enable_nvlink = gv100_fb_enable_nvlink, |
484 | .enable_hub_intr = gv11b_fb_enable_hub_intr, | 484 | .enable_hub_intr = gv100_fb_enable_hub_intr, |
485 | .disable_hub_intr = gv11b_fb_disable_hub_intr, | 485 | .disable_hub_intr = gv100_fb_disable_hub_intr, |
486 | .write_mmu_fault_buffer_lo_hi = | 486 | .write_mmu_fault_buffer_lo_hi = |
487 | fb_gv11b_write_mmu_fault_buffer_lo_hi, | 487 | fb_gv11b_write_mmu_fault_buffer_lo_hi, |
488 | .write_mmu_fault_buffer_get = | 488 | .write_mmu_fault_buffer_get = |
diff --git a/drivers/gpu/nvgpu/gv100/mc_gv100.c b/drivers/gpu/nvgpu/gv100/mc_gv100.c index 7ed9e6da..3d6f0bd3 100644 --- a/drivers/gpu/nvgpu/gv100/mc_gv100.c +++ b/drivers/gpu/nvgpu/gv100/mc_gv100.c | |||
@@ -41,7 +41,6 @@ void mc_gv100_intr_enable(struct gk20a *g) | |||
41 | 0xffffffffU); | 41 | 0xffffffffU); |
42 | gk20a_writel(g, mc_intr_en_clear_r(NVGPU_MC_INTR_NONSTALLING), | 42 | gk20a_writel(g, mc_intr_en_clear_r(NVGPU_MC_INTR_NONSTALLING), |
43 | 0xffffffffU); | 43 | 0xffffffffU); |
44 | g->ops.fb.disable_hub_intr(g, STALL_REG_INDEX, HUB_INTR_TYPE_ALL); | ||
45 | 44 | ||
46 | g->mc_intr_mask_restore[NVGPU_MC_INTR_STALLING] = | 45 | g->mc_intr_mask_restore[NVGPU_MC_INTR_STALLING] = |
47 | mc_intr_pfifo_pending_f() | | 46 | mc_intr_pfifo_pending_f() | |
@@ -56,9 +55,6 @@ void mc_gv100_intr_enable(struct gk20a *g) | |||
56 | mc_intr_pfifo_pending_f() | 55 | mc_intr_pfifo_pending_f() |
57 | | eng_intr_mask; | 56 | | eng_intr_mask; |
58 | 57 | ||
59 | /* TODO: Enable PRI faults for HUB ECC err intr */ | ||
60 | g->ops.fb.enable_hub_intr(g, STALL_REG_INDEX, g->mm.hub_intr_types); | ||
61 | |||
62 | gk20a_writel(g, mc_intr_en_set_r(NVGPU_MC_INTR_STALLING), | 58 | gk20a_writel(g, mc_intr_en_set_r(NVGPU_MC_INTR_STALLING), |
63 | g->mc_intr_mask_restore[NVGPU_MC_INTR_STALLING]); | 59 | g->mc_intr_mask_restore[NVGPU_MC_INTR_STALLING]); |
64 | 60 | ||