diff options
author | Alex Waterman <alexw@nvidia.com> | 2017-08-10 21:17:55 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-08-14 04:00:24 -0400 |
commit | df6496384794169c833c82c7aa4d9f1b0100b7e1 (patch) | |
tree | 3cdafd5f82dad5a92c2ae3b120d1151754dfdeb8 /drivers | |
parent | be122117d0bdc51e50a890268d35604c69545a43 (diff) |
gpu: nvgpu: Fix length passed to VIDMEM map
The call to __set_pd_level() for vidmem allocs had the wrong
length being passed in. This was a silent error since the subsequent
__set_pd_level() calls overwrote the bad mappings. However this
caused significantly more PDE/PTE writes than necessary since
each chunk could be mapped N times where N is the number of chunks
in an SGL.
Change-Id: Ied7247b70825dc91b9eea1c3350f4ef370ab1a52
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1537078
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/common/mm/gmmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/mm/gmmu.c b/drivers/gpu/nvgpu/common/mm/gmmu.c index 30be1b85..73dff2c3 100644 --- a/drivers/gpu/nvgpu/common/mm/gmmu.c +++ b/drivers/gpu/nvgpu/common/mm/gmmu.c | |||
@@ -501,7 +501,7 @@ static int __nvgpu_gmmu_update_page_table_vidmem(struct vm_gk20a *vm, | |||
501 | err = __set_pd_level(vm, &vm->pdb, | 501 | err = __set_pd_level(vm, &vm->pdb, |
502 | 0, | 502 | 0, |
503 | phys_addr, | 503 | phys_addr, |
504 | virt_addr, length, | 504 | virt_addr, chunk_length, |
505 | attrs); | 505 | attrs); |
506 | if (err) | 506 | if (err) |
507 | break; | 507 | break; |