summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/bus_gk20a.c
diff options
context:
space:
mode:
authorSeema Khowala <seemaj@nvidia.com>2017-09-26 18:08:34 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-11-08 07:07:12 -0500
commitec189e454d8fa3defdef1252e149577ce3b6e5b7 (patch)
tree5c5192b37ce6fd9adfe8950ff9defa4ad2d1d426 /drivers/gpu/nvgpu/gk20a/bus_gk20a.c
parent58dd20f86b3b9faef89b24f2b4ec6b62a183fe9d (diff)
gpu: nvgpu: spew err for pbus interrupt
Spew err message for pri_squash, fecserr and pri_timeout pbus interrupts. If FECS_TGT is set in timeout_save_0, addr, write fields are not reliable. Also timeout_save_1 is unreliable. For both squash and timeout should have correct data most of the time. Even for FECS_TGT, a timeout for a read should indicate the correct transaction as Host only supports one read at a time. It's mostly just writes to FECS that have potentially incorrect information. Bug 200246808 Bug 200350539 Change-Id: I8a992d924ff6c740a8dacecaaaf4ef257756d01d Signed-off-by: Seema Khowala <seemaj@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1568860 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/bus_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/bus_gk20a.c54
1 files changed, 31 insertions, 23 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/bus_gk20a.c b/drivers/gpu/nvgpu/gk20a/bus_gk20a.c
index 9b031bbf..ba4cfcbe 100644
--- a/drivers/gpu/nvgpu/gk20a/bus_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/bus_gk20a.c
@@ -62,37 +62,45 @@ void gk20a_bus_init_hw(struct gk20a *g)
62 62
63void gk20a_bus_isr(struct gk20a *g) 63void gk20a_bus_isr(struct gk20a *g)
64{ 64{
65 u32 val, err_code; 65 u32 val, save0, save1, err_code;
66
66 val = gk20a_readl(g, bus_intr_0_r()); 67 val = gk20a_readl(g, bus_intr_0_r());
68
67 if (val & (bus_intr_0_pri_squash_m() | 69 if (val & (bus_intr_0_pri_squash_m() |
68 bus_intr_0_pri_fecserr_m() | 70 bus_intr_0_pri_fecserr_m() |
69 bus_intr_0_pri_timeout_m())) { 71 bus_intr_0_pri_timeout_m())) {
70 gk20a_dbg(gpu_dbg_intr, "pmc_enable : 0x%x", 72
73 nvgpu_log(g, gpu_dbg_intr, "pmc_enable : 0x%x",
71 gk20a_readl(g, mc_enable_r())); 74 gk20a_readl(g, mc_enable_r()));
72 gk20a_dbg(gpu_dbg_intr, "NV_PBUS_INTR_0 : 0x%x", val); 75
73 gk20a_dbg(gpu_dbg_intr, 76 save0 = gk20a_readl(g, timer_pri_timeout_save_0_r());
74 "NV_PTIMER_PRI_TIMEOUT_SAVE_0: 0x%x\n", 77 if (timer_pri_timeout_save_0_fecs_tgt_v(save0)) {
75 gk20a_readl(g, timer_pri_timeout_save_0_r())); 78
76 gk20a_dbg(gpu_dbg_intr, 79 err_code = gk20a_readl(g,
77 "NV_PTIMER_PRI_TIMEOUT_SAVE_1: 0x%x\n", 80 timer_pri_timeout_fecs_errcode_r());
78 gk20a_readl(g, timer_pri_timeout_save_1_r())); 81 /* write and addr fields are not reliable */
79 err_code = gk20a_readl(g, timer_pri_timeout_fecs_errcode_r()); 82 nvgpu_err(g, "NV_PBUS_INTR_0: 0x%08x "
80 gk20a_dbg(gpu_dbg_intr, 83 "FECS_ERRCODE 0x%08x", val, err_code);
81 "NV_PTIMER_PRI_TIMEOUT_FECS_ERRCODE: 0x%x\n", 84
82 err_code); 85 if ((err_code & 0xffffff00) == 0xbadf1300)
83 if (err_code == 0xbadf13) 86 nvgpu_err(g, "NV_PGRAPH_PRI_GPC0_GPCCS_FS_GPC: "
84 gk20a_dbg(gpu_dbg_intr, 87 "0x%08x",
85 "NV_PGRAPH_PRI_GPC0_GPCCS_FS_GPC: 0x%x\n", 88 gk20a_readl(g, gr_gpc0_fs_gpc_r()));
86 gk20a_readl(g, gr_gpc0_fs_gpc_r())); 89 } else {
90 save1 = gk20a_readl(g, timer_pri_timeout_save_1_r());
91 nvgpu_err(g, "NV_PBUS_INTR_0: 0x%08x ADR 0x%08x "
92 "R/W %s DATA 0x%08x",
93 val,
94 timer_pri_timeout_save_0_addr_v(save0) << 2,
95 timer_pri_timeout_save_0_write_v(save0) ?
96 "WRITE" : "READ", save1);
97 }
87 98
88 gk20a_writel(g, timer_pri_timeout_save_0_r(), 0); 99 gk20a_writel(g, timer_pri_timeout_save_0_r(), 0);
89 gk20a_writel(g, timer_pri_timeout_save_1_r(), 0); 100 gk20a_writel(g, timer_pri_timeout_save_1_r(), 0);
101 } else {
102 nvgpu_err(g, "Unhandled NV_PBUS_INTR_0: 0x%08x", val);
90 } 103 }
91
92 if (val)
93 gk20a_dbg(gpu_dbg_intr,
94 "Unhandled pending pbus interrupt\n");
95
96 gk20a_writel(g, bus_intr_0_r(), val); 104 gk20a_writel(g, bus_intr_0_r(), val);
97} 105}
98 106
@@ -141,7 +149,7 @@ int gk20a_bus_bar1_bind(struct gk20a *g, struct nvgpu_mem *bar1_inst)
141 u64 iova = nvgpu_inst_block_addr(g, bar1_inst); 149 u64 iova = nvgpu_inst_block_addr(g, bar1_inst);
142 u32 ptr_v = (u32)(iova >> bus_bar1_block_ptr_shift_v()); 150 u32 ptr_v = (u32)(iova >> bus_bar1_block_ptr_shift_v());
143 151
144 gk20a_dbg_info("bar1 inst block ptr: 0x%08x", ptr_v); 152 nvgpu_log(g, gpu_dbg_info, "bar1 inst block ptr: 0x%08x", ptr_v);
145 153
146 gk20a_writel(g, bus_bar1_block_r(), 154 gk20a_writel(g, bus_bar1_block_r(),
147 nvgpu_aperture_mask(g, bar1_inst, 155 nvgpu_aperture_mask(g, bar1_inst,