| 1 | /* SPDX-License-Identifier: MIT */ |
|---|---|
| 2 | /* |
| 3 | * Copyright © 2014-2018 Intel Corporation |
| 4 | */ |
| 5 | |
| 6 | #ifndef _INTEL_WORKAROUNDS_H_ |
| 7 | #define _INTEL_WORKAROUNDS_H_ |
| 8 | |
| 9 | #include <linux/slab.h> |
| 10 | |
| 11 | #include "intel_workarounds_types.h" |
| 12 | |
| 13 | struct drm_i915_private; |
| 14 | struct i915_request; |
| 15 | struct intel_engine_cs; |
| 16 | struct intel_gt; |
| 17 | |
| 18 | static inline void intel_wa_list_free(struct i915_wa_list *wal) |
| 19 | { |
| 20 | kfree(objp: wal->list); |
| 21 | memset(wal, 0, sizeof(*wal)); |
| 22 | } |
| 23 | |
| 24 | void intel_engine_init_ctx_wa(struct intel_engine_cs *engine); |
| 25 | int intel_engine_emit_ctx_wa(struct i915_request *rq); |
| 26 | |
| 27 | void intel_gt_init_workarounds(struct intel_gt *gt); |
| 28 | void intel_gt_apply_workarounds(struct intel_gt *gt); |
| 29 | bool intel_gt_verify_workarounds(struct intel_gt *gt, const char *from); |
| 30 | |
| 31 | void intel_engine_init_whitelist(struct intel_engine_cs *engine); |
| 32 | void intel_engine_apply_whitelist(struct intel_engine_cs *engine); |
| 33 | |
| 34 | void intel_engine_init_workarounds(struct intel_engine_cs *engine); |
| 35 | void intel_engine_apply_workarounds(struct intel_engine_cs *engine); |
| 36 | int intel_engine_verify_workarounds(struct intel_engine_cs *engine, |
| 37 | const char *from); |
| 38 | |
| 39 | #endif |
| 40 |
