nvidia: bugfix when access remote vma

The address mapped was always the start address which was wrong.

Signed-off-by: Gang Deng <gavin.dg@linux.alibaba.com>
Signed-off-by: Xu Yu <xuyu@linux.alibaba.com>
This commit is contained in:
Gang Deng 2023-12-04 14:28:14 +08:00 committed by Xu Yu
parent e45d91de02
commit 682c32c655
1 changed files with 1 additions and 1 deletions

View File

@ -172,7 +172,7 @@ nvidia_vma_access(
}
else if (IS_FB_OFFSET(nv, offset, length))
{
addr = (offset & PAGE_MASK);
addr = (offset & PAGE_MASK) + pageIndex * PAGE_SIZE;
kernel_mapping = os_map_kernel_space(addr, PAGE_SIZE, NV_MEMORY_UNCACHED);
if (kernel_mapping == NULL)
return -ENOMEM;