xref: /linux/drivers/gpu/drm/i915/display/intel_display_wa.h (revision 1fd1dc41724319406b0aff221a352a400b0ddfc5)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2023 Intel Corporation
4  */
5 
6 #ifndef __INTEL_DISPLAY_WA_H__
7 #define __INTEL_DISPLAY_WA_H__
8 
9 #include <linux/types.h>
10 
11 struct intel_display;
12 
13 void intel_display_wa_apply(struct intel_display *display);
14 
15 #ifdef I915
16 static inline bool intel_display_needs_wa_16023588340(struct intel_display *display)
17 {
18 	return false;
19 }
20 #else
21 bool intel_display_needs_wa_16023588340(struct intel_display *display);
22 #endif
23 
24 /*
25  * This enum lists display workarounds; each entry here must have a
26  * corresponding case in __intel_display_wa().  Keep both sorted by lineage
27  * number.
28  */
29 enum intel_display_wa {
30 	INTEL_DISPLAY_WA_13012396614,
31 	INTEL_DISPLAY_WA_14011503117,
32 	INTEL_DISPLAY_WA_14025769978,
33 	INTEL_DISPLAY_WA_15018326506,
34 	INTEL_DISPLAY_WA_16023588340,
35 	INTEL_DISPLAY_WA_16025573575,
36 	INTEL_DISPLAY_WA_22014263786,
37 };
38 
39 bool __intel_display_wa(struct intel_display *display, enum intel_display_wa wa, const char *name);
40 
41 #define intel_display_wa(__display, __wa) \
42 	__intel_display_wa((__display), INTEL_DISPLAY_WA_##__wa, __stringify(__wa))
43 
44 #endif
45