1
2
3
4
5
6
7 #ifndef __I915_SELFTESTS_IGT_SPINNER_H__
8 #define __I915_SELFTESTS_IGT_SPINNER_H__
9
10 #include "gem/i915_gem_context.h"
11 #include "gt/intel_engine.h"
12
13 #include "i915_drv.h"
14 #include "i915_request.h"
15 #include "i915_selftest.h"
16
17 struct intel_gt;
18
19 struct igt_spinner {
20 struct intel_gt *gt;
21 struct drm_i915_gem_object *hws;
22 struct drm_i915_gem_object *obj;
23 u32 *batch;
24 void *seqno;
25 };
26
27 int igt_spinner_init(struct igt_spinner *spin, struct intel_gt *gt);
28 void igt_spinner_fini(struct igt_spinner *spin);
29
30 struct i915_request *
31 igt_spinner_create_request(struct igt_spinner *spin,
32 struct intel_context *ce,
33 u32 arbitration_command);
34 void igt_spinner_end(struct igt_spinner *spin);
35
36 bool igt_wait_for_spinner(struct igt_spinner *spin, struct i915_request *rq);
37
38 #endif