All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: skip unallocated PDs/PTs while invalidating
@ 2020-01-16 15:28 Christian König
  2020-01-16 15:29 ` Tom St Denis
  0 siblings, 1 reply; 2+ messages in thread
From: Christian König @ 2020-01-16 15:28 UTC (permalink / raw)
  To: tom.stdenis, amd-gfx

We don't need to return an error in this case.

Signed-off-by: Christian König <christian.koenig@amd.com>
Fixes: d6932a4d86e4 drm/amdgpu: make sure to never allocate PDs/PTs for invalidations
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 5cb182231f5d..6cf407aab279 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -1467,8 +1467,12 @@ static int amdgpu_vm_update_ptes(struct amdgpu_vm_update_params *params,
 			 * smaller than the address shift. Go to the next
 			 * child entry and try again.
 			 */
-			if (!amdgpu_vm_pt_descendant(adev, &cursor))
-				return -ENOENT;
+			if (!amdgpu_vm_pt_descendant(adev, &cursor)) {
+				if (flags & AMDGPU_PTE_VALID)
+					return -ENOENT;
+				else
+					amdgpu_vm_pt_next(adev, &cursor);
+			}
 			continue;
 		} else if (frag >= parent_shift) {
 			/* If the fragment size is even larger than the parent
-- 
2.14.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-16 15:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-16 15:28 [PATCH] drm/amdgpu: skip unallocated PDs/PTs while invalidating Christian König
2020-01-16 15:29 ` Tom St Denis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.