1 /* SPDX-License-Identifier: MIT */
3 * Copyright © 2019 Intel Corporation
9 #include "intel_engine_types.h"
10 #include "intel_gt_types.h"
11 #include "intel_reset.h"
13 struct drm_i915_private;
15 void intel_gt_init_early(struct intel_gt *gt, struct drm_i915_private *i915);
16 void intel_gt_init_hw(struct drm_i915_private *i915);
18 void intel_gt_cleanup_early(struct intel_gt *gt);
20 void intel_gt_check_and_clear_faults(struct intel_gt *gt);
21 void intel_gt_clear_error_registers(struct intel_gt *gt,
22 intel_engine_mask_t engine_mask);
24 void intel_gt_flush_ggtt_writes(struct intel_gt *gt);
25 void intel_gt_chipset_flush(struct intel_gt *gt);
27 void intel_gt_init_hangcheck(struct intel_gt *gt);
29 int intel_gt_init_scratch(struct intel_gt *gt, unsigned int size);
30 void intel_gt_fini_scratch(struct intel_gt *gt);
32 static inline u32 intel_gt_scratch_offset(const struct intel_gt *gt,
33 enum intel_gt_scratch_field field)
35 return i915_ggtt_offset(gt->scratch) + field;
38 static inline bool intel_gt_is_wedged(struct intel_gt *gt)
40 return __intel_reset_failed(>->reset);
43 void intel_gt_queue_hangcheck(struct intel_gt *gt);
45 #endif /* __INTEL_GT_H__ */