1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Copyright © 2018 Intel Corporation
4  */
5 
6 #include "i915_selftest.h"
7 #include "selftest_engine.h"
8 
9 int intel_engine_live_selftests(struct drm_i915_private *i915)
10 {
11 	static int (* const tests[])(struct intel_gt *) = {
12 		live_engine_pm_selftests,
13 		NULL,
14 	};
15 	struct intel_gt *gt = &i915->gt;
16 	typeof(*tests) *fn;
17 
18 	for (fn = tests; *fn; fn++) {
19 		int err;
20 
21 		err = (*fn)(gt);
22 		if (err)
23 			return err;
24 	}
25 
26 	return 0;
27 }
28