summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/nvgpu/gv11b/ce_gv11b.c39
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ce_gv11b.h20
2 files changed, 59 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/ce_gv11b.c b/drivers/gpu/nvgpu/gv11b/ce_gv11b.c
index efe443cc..1ba009bd 100644
--- a/drivers/gpu/nvgpu/gv11b/ce_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/ce_gv11b.c
@@ -16,13 +16,52 @@
16 * this program. 16 * this program.
17 */ 17 */
18 18
19#include "nvgpu/log.h"
20
19#include "gk20a/gk20a.h" 21#include "gk20a/gk20a.h"
20 22
21#include "gp10b/ce_gp10b.h" 23#include "gp10b/ce_gp10b.h"
22 24
23#include "ce_gv11b.h" 25#include "ce_gv11b.h"
24 26
27#include <nvgpu/hw/gv11b/hw_ce_gv11b.h>
28
29static void gv11b_ce_isr(struct gk20a *g, u32 inst_id, u32 pri_base)
30{
31 u32 ce_intr = gk20a_readl(g, ce_intr_status_r(inst_id));
32 u32 clear_intr = 0;
33
34 nvgpu_log(g, gpu_dbg_intr, "ce isr 0x%08x 0x%08x", ce_intr, inst_id);
35
36 /* An INVALID_CONFIG interrupt will be generated if a floorswept
37 * PCE is assigned to a valid LCE in the NV_CE_PCE2LCE_CONFIG
38 * registers. This is a fatal error and the LCE will have to be
39 * reset to get back to a working state.
40 */
41 if (ce_intr & ce_intr_status_invalid_config_pending_f()) {
42 nvgpu_log(g, gpu_dbg_intr,
43 "ce: inst %d: invalid config", inst_id);
44 clear_intr |= ce_intr_status_invalid_config_reset_f();
45 }
46
47 /* A MTHD_BUFFER_FAULT interrupt will be triggered if any access
48 * to a method buffer during context load or save encounters a fault.
49 * This is a fatal interrupt and will require at least the LCE to be
50 * reset before operations can start again, if not the entire GPU.
51 */
52 if (ce_intr & ce_intr_status_mthd_buffer_fault_pending_f()) {
53 nvgpu_log(g, gpu_dbg_intr,
54 "ce: inst %d: mthd buffer fault", inst_id);
55 clear_intr |= ce_intr_status_mthd_buffer_fault_reset_f();
56 }
57
58 gk20a_writel(g, ce_intr_status_r(inst_id), clear_intr);
59
60 gp10b_ce_isr(g, inst_id, pri_base);
61}
62
25void gv11b_init_ce(struct gpu_ops *gops) 63void gv11b_init_ce(struct gpu_ops *gops)
26{ 64{
27 gp10b_init_ce(gops); 65 gp10b_init_ce(gops);
66 gops->ce2.isr_stall = gv11b_ce_isr;
28} 67}
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ce_gv11b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ce_gv11b.h
index 9f279207..fbf10b82 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ce_gv11b.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ce_gv11b.h
@@ -78,4 +78,24 @@ static inline u32 ce_intr_status_launcherr_reset_f(void)
78{ 78{
79 return 0x4; 79 return 0x4;
80} 80}
81static inline u32 ce_intr_status_invalid_config_pending_f(void)
82{
83 return 0x8;
84}
85static inline u32 ce_intr_status_invalid_config_reset_f(void)
86{
87 return 0x8;
88}
89static inline u32 ce_intr_status_mthd_buffer_fault_pending_f(void)
90{
91 return 0x10;
92}
93static inline u32 ce_intr_status_mthd_buffer_fault_reset_f(void)
94{
95 return 0x10;
96}
97static inline u32 ce_pce_map_r(void)
98{
99 return 0x00104028;
100}
81#endif 101#endif