summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/pramin.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/pramin.c')
-rw-r--r--drivers/gpu/nvgpu/common/pramin.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/common/pramin.c b/drivers/gpu/nvgpu/common/pramin.c
index ba6a92ba..1448fed1 100644
--- a/drivers/gpu/nvgpu/common/pramin.c
+++ b/drivers/gpu/nvgpu/common/pramin.c
@@ -53,17 +53,19 @@ static void nvgpu_pramin_access_batched(struct gk20a *g, struct nvgpu_mem *mem,
53 * driver should be refactored to prevent this from happening, but for 53 * driver should be refactored to prevent this from happening, but for
54 * now it is ok just to ignore the writes 54 * now it is ok just to ignore the writes
55 */ 55 */
56 if (!gk20a_io_exists(g) && nvgpu_is_enabled(g, NVGPU_DRIVER_IS_DYING)) 56 if (!gk20a_io_exists(g) && nvgpu_is_enabled(g, NVGPU_DRIVER_IS_DYING)) {
57 return; 57 return;
58 }
58 59
59 alloc = mem->vidmem_alloc; 60 alloc = mem->vidmem_alloc;
60 sgt = &alloc->sgt; 61 sgt = &alloc->sgt;
61 62
62 nvgpu_sgt_for_each_sgl(sgl, sgt) { 63 nvgpu_sgt_for_each_sgl(sgl, sgt) {
63 if (offset >= nvgpu_sgt_get_length(sgt, sgl)) 64 if (offset >= nvgpu_sgt_get_length(sgt, sgl)) {
64 offset -= nvgpu_sgt_get_length(sgt, sgl); 65 offset -= nvgpu_sgt_get_length(sgt, sgl);
65 else 66 } else {
66 break; 67 break;
68 }
67 } 69 }
68 70
69 while (size) { 71 while (size) {