diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index 792fa098..2e338fef 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c | |||
@@ -219,6 +219,11 @@ static inline void pramin_access_batch_rd_n(struct gk20a *g, u32 start, | |||
219 | { | 219 | { |
220 | u32 r = start, *dest_u32 = *arg; | 220 | u32 r = start, *dest_u32 = *arg; |
221 | 221 | ||
222 | if (!g->regs) { | ||
223 | __gk20a_warn_on_no_regs(); | ||
224 | return; | ||
225 | } | ||
226 | |||
222 | while (words--) { | 227 | while (words--) { |
223 | *dest_u32++ = gk20a_readl(g, r); | 228 | *dest_u32++ = gk20a_readl(g, r); |
224 | r += sizeof(u32); | 229 | r += sizeof(u32); |
@@ -232,6 +237,11 @@ static inline void pramin_access_batch_wr_n(struct gk20a *g, u32 start, | |||
232 | { | 237 | { |
233 | u32 r = start, *src_u32 = *arg; | 238 | u32 r = start, *src_u32 = *arg; |
234 | 239 | ||
240 | if (!g->regs) { | ||
241 | __gk20a_warn_on_no_regs(); | ||
242 | return; | ||
243 | } | ||
244 | |||
235 | while (words--) { | 245 | while (words--) { |
236 | writel_relaxed(*src_u32++, g->regs + r); | 246 | writel_relaxed(*src_u32++, g->regs + r); |
237 | r += sizeof(u32); | 247 | r += sizeof(u32); |
@@ -245,6 +255,11 @@ static inline void pramin_access_batch_set(struct gk20a *g, u32 start, | |||
245 | { | 255 | { |
246 | u32 r = start, repeat = **arg; | 256 | u32 r = start, repeat = **arg; |
247 | 257 | ||
258 | if (!g->regs) { | ||
259 | __gk20a_warn_on_no_regs(); | ||
260 | return; | ||
261 | } | ||
262 | |||
248 | while (words--) { | 263 | while (words--) { |
249 | writel_relaxed(repeat, g->regs + r); | 264 | writel_relaxed(repeat, g->regs + r); |
250 | r += sizeof(u32); | 265 | r += sizeof(u32); |