summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
index 876f3115..e1f135e7 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
@@ -172,12 +172,13 @@ static inline void pramin_access_batched(struct gk20a *g, struct mem_desc *mem,
172 gk20a_readl(g, start_reg); 172 gk20a_readl(g, start_reg);
173 gk20a_pramin_exit(g, mem, chunk); 173 gk20a_pramin_exit(g, mem, chunk);
174 174
175 offset += n / sizeof(u32);
176 size -= n; 175 size -= n;
177 176
178 if (n == (chunk->length - offset)) { 177 if (n == (chunk->length - offset)) {
179 chunk = list_next_entry(chunk, list_entry); 178 chunk = list_next_entry(chunk, list_entry);
180 offset = 0; 179 offset = 0;
180 } else {
181 offset += n / sizeof(u32);
181 } 182 }
182 } 183 }
183} 184}