diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/fb_gv11b.c | 19 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/mc_gv11b.c | 8 |
2 files changed, 26 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/fb_gv11b.c b/drivers/gpu/nvgpu/gv11b/fb_gv11b.c index 9588287f..61b23711 100644 --- a/drivers/gpu/nvgpu/gv11b/fb_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/fb_gv11b.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include "gv11b/fb_gv11b.h" | 23 | #include "gv11b/fb_gv11b.h" |
24 | 24 | ||
25 | #include <nvgpu/hw/gv11b/hw_gmmu_gv11b.h> | 25 | #include <nvgpu/hw/gv11b/hw_gmmu_gv11b.h> |
26 | #include <nvgpu/hw/gv11b/hw_fb_gv11b.h> | ||
26 | 27 | ||
27 | static void gv11b_init_uncompressed_kind_map(void) | 28 | static void gv11b_init_uncompressed_kind_map(void) |
28 | { | 29 | { |
@@ -73,10 +74,26 @@ static void gv11b_init_kind_attr(void) | |||
73 | } | 74 | } |
74 | } | 75 | } |
75 | 76 | ||
77 | static void gv11b_fb_hub_isr(struct gk20a *g) | ||
78 | { | ||
79 | u32 niso_intr = gk20a_readl(g, fb_niso_intr_r()); | ||
80 | |||
81 | gk20a_dbg_info("enter hub isr, niso_intr = 0x%x", niso_intr); | ||
82 | |||
83 | if (niso_intr & | ||
84 | (fb_niso_intr_hub_access_counter_notify_pending_f() | | ||
85 | fb_niso_intr_hub_access_counter_error_pending_f())) { | ||
86 | |||
87 | gk20a_dbg_info("hub access counter notify/error"); | ||
88 | } else { | ||
89 | gk20a_dbg_info("mmu fault : TODO"); | ||
90 | } | ||
91 | } | ||
92 | |||
76 | void gv11b_init_fb(struct gpu_ops *gops) | 93 | void gv11b_init_fb(struct gpu_ops *gops) |
77 | { | 94 | { |
78 | gp10b_init_fb(gops); | 95 | gp10b_init_fb(gops); |
79 | 96 | gops->fb.hub_isr = gv11b_fb_hub_isr; | |
80 | gv11b_init_uncompressed_kind_map(); | 97 | gv11b_init_uncompressed_kind_map(); |
81 | gv11b_init_kind_attr(); | 98 | gv11b_init_kind_attr(); |
82 | 99 | ||
diff --git a/drivers/gpu/nvgpu/gv11b/mc_gv11b.c b/drivers/gpu/nvgpu/gv11b/mc_gv11b.c index 83c03029..c901fd76 100644 --- a/drivers/gpu/nvgpu/gv11b/mc_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/mc_gv11b.c | |||
@@ -31,10 +31,12 @@ static void mc_gv11b_intr_enable(struct gk20a *g) | |||
31 | 0xffffffff); | 31 | 0xffffffff); |
32 | g->ops.mc.intr_mask_restore[NVGPU_MC_INTR_STALLING] = | 32 | g->ops.mc.intr_mask_restore[NVGPU_MC_INTR_STALLING] = |
33 | mc_intr_pfifo_pending_f() | | 33 | mc_intr_pfifo_pending_f() | |
34 | mc_intr_hub_pending_f() | | ||
34 | mc_intr_priv_ring_pending_f() | | 35 | mc_intr_priv_ring_pending_f() | |
35 | mc_intr_pbus_pending_f() | | 36 | mc_intr_pbus_pending_f() | |
36 | mc_intr_ltc_pending_f() | | 37 | mc_intr_ltc_pending_f() | |
37 | eng_intr_mask; | 38 | eng_intr_mask; |
39 | |||
38 | gk20a_writel(g, mc_intr_en_set_r(NVGPU_MC_INTR_STALLING), | 40 | gk20a_writel(g, mc_intr_en_set_r(NVGPU_MC_INTR_STALLING), |
39 | g->ops.mc.intr_mask_restore[NVGPU_MC_INTR_STALLING]); | 41 | g->ops.mc.intr_mask_restore[NVGPU_MC_INTR_STALLING]); |
40 | 42 | ||
@@ -47,8 +49,14 @@ static void mc_gv11b_intr_enable(struct gk20a *g) | |||
47 | g->ops.mc.intr_mask_restore[NVGPU_MC_INTR_NONSTALLING]); | 49 | g->ops.mc.intr_mask_restore[NVGPU_MC_INTR_NONSTALLING]); |
48 | } | 50 | } |
49 | 51 | ||
52 | static bool gv11b_mc_is_intr_hub_pending(struct gk20a *g, u32 mc_intr_0) | ||
53 | { | ||
54 | return ((mc_intr_0 & mc_intr_hub_pending_f()) ? true : false); | ||
55 | } | ||
56 | |||
50 | void gv11b_init_mc(struct gpu_ops *gops) | 57 | void gv11b_init_mc(struct gpu_ops *gops) |
51 | { | 58 | { |
52 | gp10b_init_mc(gops); | 59 | gp10b_init_mc(gops); |
53 | gops->mc.intr_enable = mc_gv11b_intr_enable; | 60 | gops->mc.intr_enable = mc_gv11b_intr_enable; |
61 | gops->mc.is_intr_hub_pending = gv11b_mc_is_intr_hub_pending; | ||
54 | } | 62 | } |