drm/xe/tests: Support CPU page-table updates in the migrate test

The migrate test currently supports only GPU pagetable updates and
will thus break if we fix the CPU pagetable update selection.

Fix the migrate test first.

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
Thomas Hellström 2023-03-10 16:41:08 +01:00 committed by Rodrigo Vivi
parent fc1cc68030
commit 17a28ea23c

View File

@ -66,9 +66,16 @@ sanity_populate_cb(struct xe_migrate_pt_update *pt_update,
{
int i;
u64 *ptr = dst;
u64 value;
for (i = 0; i < num_qwords; i++)
ptr[i] = (qword_ofs + i - update->ofs) * 0x1111111111111111ULL;
for (i = 0; i < num_qwords; i++) {
value = (qword_ofs + i - update->ofs) * 0x1111111111111111ULL;
if (map)
xe_map_wr(gt_to_xe(gt), map, (qword_ofs + i) *
sizeof(u64), u64, value);
else
ptr[i] = value;
}
}
static const struct xe_migrate_pt_update_ops sanity_ops = {