18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * SPDX-License-Identifier: MIT 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Copyright © 2018 Intel Corporation 58c2ecf20Sopenharmony_ci */ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#ifndef __I915_SELFTESTS_IGT_SPINNER_H__ 88c2ecf20Sopenharmony_ci#define __I915_SELFTESTS_IGT_SPINNER_H__ 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#include "gem/i915_gem_context.h" 118c2ecf20Sopenharmony_ci#include "gt/intel_engine.h" 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci#include "i915_drv.h" 148c2ecf20Sopenharmony_ci#include "i915_request.h" 158c2ecf20Sopenharmony_ci#include "i915_selftest.h" 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_cistruct intel_gt; 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_cistruct igt_spinner { 208c2ecf20Sopenharmony_ci struct intel_gt *gt; 218c2ecf20Sopenharmony_ci struct drm_i915_gem_object *hws; 228c2ecf20Sopenharmony_ci struct drm_i915_gem_object *obj; 238c2ecf20Sopenharmony_ci u32 *batch; 248c2ecf20Sopenharmony_ci void *seqno; 258c2ecf20Sopenharmony_ci}; 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ciint igt_spinner_init(struct igt_spinner *spin, struct intel_gt *gt); 288c2ecf20Sopenharmony_civoid igt_spinner_fini(struct igt_spinner *spin); 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_cistruct i915_request * 318c2ecf20Sopenharmony_ciigt_spinner_create_request(struct igt_spinner *spin, 328c2ecf20Sopenharmony_ci struct intel_context *ce, 338c2ecf20Sopenharmony_ci u32 arbitration_command); 348c2ecf20Sopenharmony_civoid igt_spinner_end(struct igt_spinner *spin); 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_cibool igt_wait_for_spinner(struct igt_spinner *spin, struct i915_request *rq); 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci#endif 39