intel_scheduler_helpers.h 907 B

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