124f90d66SChris Wilson /* SPDX-License-Identifier: MIT */ 2112ed2d3SChris Wilson /* 3112ed2d3SChris Wilson * Copyright © 2014-2018 Intel Corporation 4112ed2d3SChris Wilson */ 5112ed2d3SChris Wilson 6112ed2d3SChris Wilson #ifndef _INTEL_WORKAROUNDS_H_ 7112ed2d3SChris Wilson #define _INTEL_WORKAROUNDS_H_ 8112ed2d3SChris Wilson 9112ed2d3SChris Wilson #include <linux/slab.h> 10112ed2d3SChris Wilson 11112ed2d3SChris Wilson #include "intel_workarounds_types.h" 12112ed2d3SChris Wilson 13112ed2d3SChris Wilson struct drm_i915_private; 14112ed2d3SChris Wilson struct i915_request; 15112ed2d3SChris Wilson struct intel_engine_cs; 16d10cfee4STvrtko Ursulin struct intel_gt; 17112ed2d3SChris Wilson intel_wa_list_free(struct i915_wa_list * wal)18112ed2d3SChris Wilsonstatic inline void intel_wa_list_free(struct i915_wa_list *wal) 19112ed2d3SChris Wilson { 20112ed2d3SChris Wilson kfree(wal->list); 21112ed2d3SChris Wilson memset(wal, 0, sizeof(*wal)); 22112ed2d3SChris Wilson } 23112ed2d3SChris Wilson 24112ed2d3SChris Wilson void intel_engine_init_ctx_wa(struct intel_engine_cs *engine); 25112ed2d3SChris Wilson int intel_engine_emit_ctx_wa(struct i915_request *rq); 26112ed2d3SChris Wilson 27*d0a65249SVenkata Sandeep Dhanalakota void intel_gt_init_workarounds(struct intel_gt *gt); 28d10cfee4STvrtko Ursulin void intel_gt_apply_workarounds(struct intel_gt *gt); 29d10cfee4STvrtko Ursulin bool intel_gt_verify_workarounds(struct intel_gt *gt, const char *from); 30112ed2d3SChris Wilson 31112ed2d3SChris Wilson void intel_engine_init_whitelist(struct intel_engine_cs *engine); 32112ed2d3SChris Wilson void intel_engine_apply_whitelist(struct intel_engine_cs *engine); 33112ed2d3SChris Wilson 34112ed2d3SChris Wilson void intel_engine_init_workarounds(struct intel_engine_cs *engine); 35112ed2d3SChris Wilson void intel_engine_apply_workarounds(struct intel_engine_cs *engine); 36112ed2d3SChris Wilson int intel_engine_verify_workarounds(struct intel_engine_cs *engine, 37112ed2d3SChris Wilson const char *from); 38112ed2d3SChris Wilson 39112ed2d3SChris Wilson #endif 40