diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 144cb37d..a4cbb4b2 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -1111,6 +1111,8 @@ void gk20a_init_clk_ops(struct gpu_ops *gops); | |||
1111 | int gk20a_lockout_registers(struct gk20a *g); | 1111 | int gk20a_lockout_registers(struct gk20a *g); |
1112 | int gk20a_restore_registers(struct gk20a *g); | 1112 | int gk20a_restore_registers(struct gk20a *g); |
1113 | 1113 | ||
1114 | void __nvgpu_check_gpu_state(struct gk20a *g); | ||
1115 | |||
1114 | static inline void gk20a_writel(struct gk20a *g, u32 r, u32 v) | 1116 | static inline void gk20a_writel(struct gk20a *g, u32 r, u32 v) |
1115 | { | 1117 | { |
1116 | gk20a_dbg(gpu_dbg_reg, " r=0x%x v=0x%x", r, v); | 1118 | gk20a_dbg(gpu_dbg_reg, " r=0x%x v=0x%x", r, v); |
@@ -1120,7 +1122,12 @@ static inline void gk20a_writel(struct gk20a *g, u32 r, u32 v) | |||
1120 | static inline u32 gk20a_readl(struct gk20a *g, u32 r) | 1122 | static inline u32 gk20a_readl(struct gk20a *g, u32 r) |
1121 | { | 1123 | { |
1122 | u32 v = readl(g->regs + r); | 1124 | u32 v = readl(g->regs + r); |
1125 | |||
1126 | if (v == 0xffffffff) | ||
1127 | __nvgpu_check_gpu_state(g); | ||
1128 | |||
1123 | gk20a_dbg(gpu_dbg_reg, " r=0x%x v=0x%x", r, v); | 1129 | gk20a_dbg(gpu_dbg_reg, " r=0x%x v=0x%x", r, v); |
1130 | |||
1124 | return v; | 1131 | return v; |
1125 | } | 1132 | } |
1126 | static inline void gk20a_writel_check(struct gk20a *g, u32 r, u32 v) | 1133 | static inline void gk20a_writel_check(struct gk20a *g, u32 r, u32 v) |