Linux Audio

Check our new training course

Loading...
v5.4
 
 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
10int 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}
v6.2
 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
 9int 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 = to_gt(i915);
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}