Skip to content

Commit 31d0271

Browse files
Yintian Taoalexdeucher
authored andcommitted
drm/amdgpu: miss PRT case when bo update
Originally, only the PTE valid is taken in consider. The PRT case is missied when bo update which raise problem. We need add condition for PRT case. v2: add PRT condition for amdgpu_vm_bo_update_mapping, too v3: fix one typo error Signed-off-by: Yintian Tao <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 7287a67 commit 31d0271

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,7 +1446,7 @@ static int amdgpu_vm_update_ptes(struct amdgpu_vm_update_params *params,
14461446
uint64_t incr, entry_end, pe_start;
14471447
struct amdgpu_bo *pt;
14481448

1449-
if (flags & AMDGPU_PTE_VALID) {
1449+
if (flags & (AMDGPU_PTE_VALID | AMDGPU_PTE_PRT)) {
14501450
/* make sure that the page tables covering the
14511451
* address range are actually allocated
14521452
*/
@@ -1603,7 +1603,7 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
16031603
goto error_unlock;
16041604
}
16051605

1606-
if (flags & AMDGPU_PTE_VALID) {
1606+
if (flags & (AMDGPU_PTE_VALID | AMDGPU_PTE_PRT)) {
16071607
struct amdgpu_bo *root = vm->root.base.bo;
16081608

16091609
if (!dma_fence_is_signaled(vm->last_direct))
@@ -1715,7 +1715,7 @@ static int amdgpu_vm_bo_split_mapping(struct amdgpu_device *adev,
17151715
AMDGPU_GPU_PAGES_IN_CPU_PAGE;
17161716
}
17171717

1718-
} else if (flags & AMDGPU_PTE_VALID) {
1718+
} else if (flags & (AMDGPU_PTE_VALID | AMDGPU_PTE_PRT)) {
17191719
addr += bo_adev->vm_manager.vram_base_offset;
17201720
addr += pfn << PAGE_SHIFT;
17211721
}

0 commit comments

Comments
 (0)