summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r--drivers/gpu/nvgpu/vgpu/gp10b/vgpu_mm_gp10b.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_mm_gp10b.c b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_mm_gp10b.c
index 1f537d48..926f243d 100644
--- a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_mm_gp10b.c
+++ b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_mm_gp10b.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Virtualized GPU Memory Management 2 * Virtualized GPU Memory Management
3 * 3 *
4 * Copyright (c) 2015-2020, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2015-2021, NVIDIA CORPORATION. All rights reserved.
5 * 5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a 6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"), 7 * copy of this software and associated documentation files (the "Software"),
@@ -130,11 +130,12 @@ u64 vgpu_gp10b_locked_gmmu_map(struct vm_gk20a *vm,
130 chunk_length = min(size, 130 chunk_length = min(size,
131 nvgpu_sgt_get_length(sgt, sgl) - space_to_skip); 131 nvgpu_sgt_get_length(sgt, sgl) - space_to_skip);
132 132
133 if (add_mem_desc(&mem_desc[mem_desc_count++], phys_addr, 133 if (add_mem_desc(&mem_desc[mem_desc_count], phys_addr,
134 chunk_length, &oob_size)) { 134 chunk_length, &oob_size)) {
135 err = -ENOMEM; 135 err = -ENOMEM;
136 goto fail; 136 goto fail;
137 } 137 }
138 mem_desc_count++;
138 139
139 space_to_skip = 0; 140 space_to_skip = 0;
140 size -= chunk_length; 141 size -= chunk_length;