Linux Audio

Check our new training course

Real-Time Linux with PREEMPT_RT training

Feb 18-20, 2025
Register
Loading...
v6.8
 1/*
 2 * SPDX-License-Identifier: MIT
 3 *
 4 * Copyright © 2019 Intel Corporation
 5 */
 6
 7#ifndef IGT_LIVE_TEST_H
 8#define IGT_LIVE_TEST_H
 9
10#include "gt/intel_gt_defines.h" /* for I915_MAX_GT */
11#include "gt/intel_engine.h" /* for I915_NUM_ENGINES */
12
13struct drm_i915_private;
14
15struct igt_live_test {
16	struct drm_i915_private *i915;
17	const char *func;
18	const char *name;
19
20	unsigned int reset_global;
21	unsigned int reset_engine[I915_MAX_GT][I915_NUM_ENGINES];
22};
23
24/*
25 * Flush the GPU state before and after the test to ensure that no residual
26 * code is running on the GPU that may affect this test. Also compare the
27 * state before and after the test and alert if it unexpectedly changes,
28 * e.g. if the GPU was reset.
29 */
30int igt_live_test_begin(struct igt_live_test *t,
31			struct drm_i915_private *i915,
32			const char *func,
33			const char *name);
34int igt_live_test_end(struct igt_live_test *t);
35
36#endif /* IGT_LIVE_TEST_H */
v5.14.15
 1/*
 2 * SPDX-License-Identifier: MIT
 3 *
 4 * Copyright © 2019 Intel Corporation
 5 */
 6
 7#ifndef IGT_LIVE_TEST_H
 8#define IGT_LIVE_TEST_H
 9
 
10#include "gt/intel_engine.h" /* for I915_NUM_ENGINES */
11
12struct drm_i915_private;
13
14struct igt_live_test {
15	struct drm_i915_private *i915;
16	const char *func;
17	const char *name;
18
19	unsigned int reset_global;
20	unsigned int reset_engine[I915_NUM_ENGINES];
21};
22
23/*
24 * Flush the GPU state before and after the test to ensure that no residual
25 * code is running on the GPU that may affect this test. Also compare the
26 * state before and after the test and alert if it unexpectedly changes,
27 * e.g. if the GPU was reset.
28 */
29int igt_live_test_begin(struct igt_live_test *t,
30			struct drm_i915_private *i915,
31			const char *func,
32			const char *name);
33int igt_live_test_end(struct igt_live_test *t);
34
35#endif /* IGT_LIVE_TEST_H */