[Intel-xe] [PATCH 2/2] drm/xe/tests: Grab a memory access reference around the migrate sanity test

Niranjana Vishwanathapura niranjana.vishwanathapura at intel.com
Fri Mar 3 06:20:46 UTC 2023


On Thu, Mar 02, 2023 at 01:42:58PM +0100, Thomas Hellström wrote:
>It appears we don't hold a memory access reference for the accesses in
>this test, which may results in printed warnings and possibly the GT
>not woken up for the memory accesses.
>
>Add a memory access reference around the test.
>
>Signed-off-by: Thomas Hellström <thomas.hellstrom at linux.intel.com>
>---
> drivers/gpu/drm/xe/tests/xe_migrate.c | 2 ++
> 1 file changed, 2 insertions(+)
>
>diff --git a/drivers/gpu/drm/xe/tests/xe_migrate.c b/drivers/gpu/drm/xe/tests/xe_migrate.c
>index 0de17e90aba9..b7e4a126e8b7 100644
>--- a/drivers/gpu/drm/xe/tests/xe_migrate.c
>+++ b/drivers/gpu/drm/xe/tests/xe_migrate.c
>@@ -366,7 +366,9 @@ static int migrate_test_run_device(struct xe_device *xe)
>
> 		kunit_info(test, "Testing gt id %d.\n", id);
> 		xe_vm_lock(m->eng->vm, &ww, 0, true);
>+		xe_device_mem_access_get(xe);
> 		xe_migrate_sanity_test(m, test);
>+		xe_device_mem_access_put(xe);
> 		xe_vm_unlock(m->eng->vm, &ww);
> 	}

This will do. Rodrigo had a patch to call get/put mem access from inside
xe_vm_lock/unlock(), which is more generic. Perhaps we can do that if
we run into this issue in some other path.

Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura at intel.com>

>
>-- 
>2.39.2
>


More information about the Intel-xe mailing list