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