Commit | Line | Data |
---|---|---|
24635c51 TU |
1 | /* SPDX-License-Identifier: MIT */ |
2 | /* | |
3 | * Copyright © 2019 Intel Corporation | |
4 | */ | |
5 | ||
6 | #ifndef __INTEL_GT__ | |
7 | #define __INTEL_GT__ | |
8 | ||
eaf522f6 | 9 | #include "intel_engine_types.h" |
24635c51 | 10 | #include "intel_gt_types.h" |
cb823ed9 | 11 | #include "intel_reset.h" |
24635c51 | 12 | |
724e9564 TU |
13 | struct drm_i915_private; |
14 | ||
15 | void intel_gt_init_early(struct intel_gt *gt, struct drm_i915_private *i915); | |
d8a44248 | 16 | void intel_gt_init_hw(struct drm_i915_private *i915); |
24635c51 | 17 | |
cb823ed9 CW |
18 | void intel_gt_cleanup_early(struct intel_gt *gt); |
19 | ||
eaf522f6 TU |
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); | |
23 | ||
a1c8a09e | 24 | void intel_gt_flush_ggtt_writes(struct intel_gt *gt); |
baea429d | 25 | void intel_gt_chipset_flush(struct intel_gt *gt); |
a1c8a09e | 26 | |
cb823ed9 CW |
27 | void intel_gt_init_hangcheck(struct intel_gt *gt); |
28 | ||
db56f974 TU |
29 | int intel_gt_init_scratch(struct intel_gt *gt, unsigned int size); |
30 | void intel_gt_fini_scratch(struct intel_gt *gt); | |
31 | ||
46c5847e LL |
32 | static inline u32 intel_gt_scratch_offset(const struct intel_gt *gt, |
33 | enum intel_gt_scratch_field field) | |
db56f974 | 34 | { |
46c5847e | 35 | return i915_ggtt_offset(gt->scratch) + field; |
db56f974 TU |
36 | } |
37 | ||
cb823ed9 CW |
38 | static inline bool intel_gt_is_wedged(struct intel_gt *gt) |
39 | { | |
40 | return __intel_reset_failed(>->reset); | |
41 | } | |
42 | ||
43 | void intel_gt_queue_hangcheck(struct intel_gt *gt); | |
44 | ||
24635c51 | 45 | #endif /* __INTEL_GT_H__ */ |