Commit 649b93db authored by Matthew Brost's avatar Matthew Brost
Browse files

drm/xe: Fix xe_pt_abort_unbind



When restoring the children PT entries on a bind failure the incorrect
loop index has used resulting in PT entries being leaked. This is shown
by running xe_vm.bind-array-conflict-error-inject on a VRAM device going
into a suspend state after the test completes.

v2:
 - s/childern/children (CI, Matt Auld)

Fixes: a708f650 ("drm/xe: Update PT layer with better error handling")
Cc: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: default avatarMatthew Brost <matthew.brost@intel.com>
Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240723010230.1652707-1-matthew.brost@intel.com
parent 7e0fe233
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1564,7 +1564,7 @@ static void xe_pt_abort_unbind(struct xe_vma *vma,
			continue;

		for (j = entry->ofs; j < entry->ofs + entry->qwords; j++)
			pt_dir->children[i] =
			pt_dir->children[j] =
				entries[i].pt_entries[j - entry->ofs].pt ?
				&entries[i].pt_entries[j - entry->ofs].pt->base : NULL;
	}