mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 09:57:08 +03:00
gpu: nvgpu: vgpu: set correct page size index for gp10b
VM server only know big page and small page, so convert gmmu_page_size_kernel to according page size index. JIRA VFND-890 Change-Id: Id1f932752b8ca33d14635ac9d71019364aa89dc4 Signed-off-by: Richard Zhao <rizhao@nvidia.com> Reviewed-on: http://git-master/r/816359 (cherry picked from commit 5bfc4a2a55889f5457bd34aa06861c042ee67421) Reviewed-on: http://git-master/r/827131 GVS: Gerrit_Virtual_Submit Reviewed-by: Vladislav Buzov <vbuzov@nvidia.com>
This commit is contained in:
committed by
Deepak Nibade
parent
de2656300a
commit
b7de6b004b
@@ -134,6 +134,19 @@ static u64 vgpu_gp10b_locked_gmmu_map(struct vm_gk20a *vm,
|
|||||||
else
|
else
|
||||||
prot = TEGRA_VGPU_MAP_PROT_NONE;
|
prot = TEGRA_VGPU_MAP_PROT_NONE;
|
||||||
|
|
||||||
|
if (pgsz_idx == gmmu_page_size_kernel) {
|
||||||
|
if (page_size == vm->gmmu_page_sizes[gmmu_page_size_small]) {
|
||||||
|
pgsz_idx = gmmu_page_size_small;
|
||||||
|
} else if (page_size ==
|
||||||
|
vm->gmmu_page_sizes[gmmu_page_size_big]) {
|
||||||
|
pgsz_idx = gmmu_page_size_big;
|
||||||
|
} else {
|
||||||
|
gk20a_err(d, "invalid kernel page size %d\n",
|
||||||
|
page_size);
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
msg.cmd = TEGRA_VGPU_CMD_AS_MAP_EX;
|
msg.cmd = TEGRA_VGPU_CMD_AS_MAP_EX;
|
||||||
msg.handle = platform->virt_handle;
|
msg.handle = platform->virt_handle;
|
||||||
p->handle = vm->handle;
|
p->handle = vm->handle;
|
||||||
|
|||||||
Reference in New Issue
Block a user