[PATCH] drm/amdgpu: skip update root page table

Pan, Xinhui Xinhui.Pan at amd.com
Sat Feb 8 15:12:21 UTC 2020


The pde is on root page table. No need to update parent's page table.

Change-Id: I2ec1015736039cf0278bdfa9bec35185ece506b5
Signed-off-by: xinhui pan <xinhui.pan at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index cc56eaba1911..247f328b7223 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -1235,10 +1235,14 @@ static int amdgpu_vm_update_pde(struct amdgpu_vm_update_params *params,
 				struct amdgpu_vm_pt *entry)
 {
 	struct amdgpu_vm_pt *parent = amdgpu_vm_pt_parent(entry);
-	struct amdgpu_bo *bo = parent->base.bo, *pbo;
+	struct amdgpu_bo *bo, *pbo;
 	uint64_t pde, pt, flags;
 	unsigned level;
 
+	if (!parent)
+		return 0;
+
+	bo = parent->base.bo;
 	for (level = 0, pbo = bo->parent; pbo; ++level)
 		pbo = pbo->parent;
 
-- 
2.17.1



More information about the amd-gfx mailing list