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