summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu
diff options
context:
space:
mode:
authorSeema Khowala <seemaj@nvidia.com>2017-03-01 16:43:40 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-03-30 19:39:11 -0400
commit7b5f1bd68d8e4b90d0d5d861dbea256d982c69e5 (patch)
tree2df281eba3dbb865397685c11d39258b90ca6537 /drivers/gpu/nvgpu
parent3032acfc04f5c483dc08434f27f9912e7dee72c9 (diff)
gpu: ngpu: gv11b: support hub interrupt
Hub interrupt handler will be added later JIRA GPUT19X-7 Change-Id: I892e392c6c1fe7d92795b2cab2301f2e68e787c3 Signed-off-by: Seema Khowala <seemaj@nvidia.com> Reviewed-on: http://git-master/r/1313453 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r--drivers/gpu/nvgpu/gv11b/fb_gv11b.c19
-rw-r--r--drivers/gpu/nvgpu/gv11b/mc_gv11b.c8
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
27static void gv11b_init_uncompressed_kind_map(void) 28static 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
77static 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
76void gv11b_init_fb(struct gpu_ops *gops) 93void 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
52static 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
50void gv11b_init_mc(struct gpu_ops *gops) 57void 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}