summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu
diff options
context:
space:
mode:
authorPeter Daifuku <pdaifuku@nvidia.com>2018-11-18 19:55:15 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2019-06-25 02:14:56 -0400
commit00b41b85389fe08be780d0e6134e9e891ea65399 (patch)
tree52a28e9c48b88573aa004c1fa86d9029d30ba8f4 /drivers/gpu/nvgpu
parente5c8bbb391ab83b1ee2289ae94b215992f94b70e (diff)
gpu: nvgpu: align size to page size in vgpu map
Align size to the page size in vgpu_gp10b_locked_gmmu_map before setting up the memory descriptors being passed to the RM server Bug 2212569 Bug 200528973 Change-Id: I7149f3116c2c4c909f77cd791f5954ad8c486073 Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1953444 (cherry picked from commit 0babd46eb49d9d1b2f8562cea17a419677619b0e) Reviewed-on: https://git-master.nvidia.com/r/2140963 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Thomas Steinle <tsteinle@nvidia.com> Reviewed-by: Satish Arora <satisha@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r--drivers/gpu/nvgpu/vgpu/gp10b/vgpu_mm_gp10b.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_mm_gp10b.c b/drivers/gpu/nvgpu/vgpu/gp10b/vgpu_mm_gp10b.c
index 6017046f..4b06aea8 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-2018, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2015-2019, 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"),
@@ -108,6 +108,10 @@ u64 vgpu_gp10b_locked_gmmu_map(struct vm_gk20a *vm,
108 goto fail; 108 goto fail;
109 } 109 }
110 sgl = sgt->sgl; 110 sgl = sgt->sgl;
111
112 /* Align size to page size */
113 size = ALIGN(size, page_size);
114
111 while (sgl) { 115 while (sgl) {
112 u64 phys_addr; 116 u64 phys_addr;
113 u64 chunk_length; 117 u64 chunk_length;