Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * SPDX-License-Identifier: MIT
0003  *
0004  * Copyright © 2019 Intel Corporation
0005  */
0006 
0007 #ifndef IGT_LIVE_TEST_H
0008 #define IGT_LIVE_TEST_H
0009 
0010 #include "gt/intel_engine.h" /* for I915_NUM_ENGINES */
0011 
0012 struct drm_i915_private;
0013 
0014 struct igt_live_test {
0015     struct drm_i915_private *i915;
0016     const char *func;
0017     const char *name;
0018 
0019     unsigned int reset_global;
0020     unsigned int reset_engine[I915_NUM_ENGINES];
0021 };
0022 
0023 /*
0024  * Flush the GPU state before and after the test to ensure that no residual
0025  * code is running on the GPU that may affect this test. Also compare the
0026  * state before and after the test and alert if it unexpectedly changes,
0027  * e.g. if the GPU was reset.
0028  */
0029 int igt_live_test_begin(struct igt_live_test *t,
0030             struct drm_i915_private *i915,
0031             const char *func,
0032             const char *name);
0033 int igt_live_test_end(struct igt_live_test *t);
0034 
0035 #endif /* IGT_LIVE_TEST_H */