Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-xe] [PATCH 1/4] drm/xe/selftests: hold rpm for evict_test_run_device()
@ 2023-07-13  9:41 Matthew Auld
  2023-07-13  9:41 ` [Intel-xe] [PATCH 2/4] drm/xe/selftests: hold rpm for ccs_test_migrate() Matthew Auld
                   ` (9 more replies)
  0 siblings, 10 replies; 15+ messages in thread
From: Matthew Auld @ 2023-07-13  9:41 UTC (permalink / raw)
  To: intel-xe

We are calling fairly low level things like xe_bo_restore_kernel() which
expect caller to be holding mem_access.ref. Since we are doing stuff
like evict_all we likely don't want to race with rpm suspend, since that
potentially wants to do the same thing, so just wrap the whole test.

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
---
 drivers/gpu/drm/xe/tests/xe_bo.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/xe/tests/xe_bo.c b/drivers/gpu/drm/xe/tests/xe_bo.c
index 5309204d8d1b..edee4116c59d 100644
--- a/drivers/gpu/drm/xe/tests/xe_bo.c
+++ b/drivers/gpu/drm/xe/tests/xe_bo.c
@@ -12,6 +12,7 @@
 
 #include "xe_bo_evict.h"
 #include "xe_pci.h"
+#include "xe_pm.h"
 
 static int ccs_test_migrate(struct xe_gt *gt, struct xe_bo *bo,
 			    bool clear, u64 get_val, u64 assign_val,
@@ -295,9 +296,15 @@ static int evict_test_run_device(struct xe_device *xe)
 		return 0;
 	}
 
+	xe_pm_runtime_get(xe); /* FIXME: remove once mem_access actually works */
+	xe_device_mem_access_get(xe);
+
 	for_each_gt(gt, xe, id)
 		evict_test_run_gt(xe, gt, test);
 
+	xe_device_mem_access_put(xe);
+	xe_pm_runtime_put(xe);
+
 	return 0;
 }
 
-- 
2.41.0


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

end of thread, other threads:[~2023-07-14  9:02 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-13  9:41 [Intel-xe] [PATCH 1/4] drm/xe/selftests: hold rpm for evict_test_run_device() Matthew Auld
2023-07-13  9:41 ` [Intel-xe] [PATCH 2/4] drm/xe/selftests: hold rpm for ccs_test_migrate() Matthew Auld
2023-07-13 15:24   ` Nirmoy Das
2023-07-13  9:41 ` [Intel-xe] [PATCH 3/4] drm/xe/selftests: restart GT after xe_bo_restore_kernel() Matthew Auld
2023-07-13 15:34   ` Nirmoy Das
2023-07-13  9:41 ` [Intel-xe] [PATCH 4/4] drm/xe: add missing bulk_move reset Matthew Auld
2023-07-13 16:05   ` Nirmoy Das
2023-07-14  9:02     ` Matthew Auld
2023-07-13 10:37 ` [Intel-xe] ✓ CI.Patch_applied: success for series starting with [1/4] drm/xe/selftests: hold rpm for evict_test_run_device() Patchwork
2023-07-13 10:37 ` [Intel-xe] ✓ CI.checkpatch: " Patchwork
2023-07-13 10:39 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-07-13 10:43 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-07-13 10:43 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-07-13 10:44 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-07-13 15:24 ` [Intel-xe] [PATCH 1/4] " Nirmoy Das

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox