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 14 struct intel_selftest_saved_policy { 15 u32 flags; 16 u32 reset; 17 u64 timeslice; 18 u64 preempt_timeout; 19 }; 20 21 enum selftest_scheduler_modify { 22 SELFTEST_SCHEDULER_MODIFY_NO_HANGCHECK = 0, 23 SELFTEST_SCHEDULER_MODIFY_FAST_RESET, 24 }; 25 26 int intel_selftest_modify_policy(struct intel_engine_cs *engine, 27 struct intel_selftest_saved_policy *saved, 28 enum selftest_scheduler_modify modify_type); 29 int intel_selftest_restore_policy(struct intel_engine_cs *engine, 30 struct intel_selftest_saved_policy *saved); 31 int intel_selftest_wait_for_rq(struct i915_request *rq); 32 33 #endif 34