1 /* SPDX-License-Identifier: MIT */ 2 /* 3 * Copyright © 2021 Intel Corporation 4 */ 5 6 #ifndef _INTEL_SELFTEST_SCHEDULER_HELPERS_H_ 7 #define _INTEL_SELFTEST_SCHEDULER_HELPERS_H_ 8 9 #include <linux/types.h> 10 11 struct i915_request; 12 struct intel_engine_cs; 13 struct intel_gt; 14 15 struct intel_selftest_saved_policy { 16 u32 flags; 17 u32 reset; 18 u64 timeslice; 19 u64 preempt_timeout; 20 }; 21 22 enum selftest_scheduler_modify { 23 SELFTEST_SCHEDULER_MODIFY_NO_HANGCHECK = 0, 24 SELFTEST_SCHEDULER_MODIFY_FAST_RESET, 25 }; 26 27 struct intel_engine_cs *intel_selftest_find_any_engine(struct intel_gt *gt); 28 int intel_selftest_modify_policy(struct intel_engine_cs *engine, 29 struct intel_selftest_saved_policy *saved, 30 enum selftest_scheduler_modify modify_type); 31 int intel_selftest_restore_policy(struct intel_engine_cs *engine, 32 struct intel_selftest_saved_policy *saved); 33 int intel_selftest_wait_for_rq(struct i915_request *rq); 34 35 #endif 36