drm/xe/tests: Fix xe_migrate test for !CONFIG_XE_DRM_DEBUG
We could be pinning a system memory buffer object without CONFIG_DRM_XE_DEBUG. That is not allowed with DGFX, so instead explicitly lock, validate and vmap the bo for the duration of the test.
This fixes issue #137 (closed).
Also make sure we check for vma != NULL in xe_migrate_update_pgtables, also in the !CONFIG_XE_DRM_DEBUG case, as otherwise we'd hit a NULL pointer dereference.
Signed-off-by: Thomas Hellström thomas.hellstrom@linux.intel.com
Edited by Thomas Hellström