|
3 | 3 | # Makefile for the drm device driver. This driver provides support for the |
4 | 4 | # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher. |
5 | 5 |
|
6 | | -# Add a set of useful warning flags and enable -Werror for CI to prevent |
7 | | -# trivial mistakes from creeping in. We have to do this piecemeal as we reject |
8 | | -# any patch that isn't warning clean, so turning on -Wall -Wextra (or W=1) we |
9 | | -# need to filter out dubious warnings. Still it is our interest |
10 | | -# to keep running locally with W=1 C=1 until we are completely clean. |
11 | | -# |
12 | | -# Note the danger in using -Wall -Wextra is that when CI updates gcc we |
13 | | -# will most likely get a sudden build breakage... Hopefully we will fix |
14 | | -# new warnings before CI updates! |
15 | | -subdir-ccflags-y := -Wall -Wextra |
16 | | -subdir-ccflags-y += -Wno-format-security |
17 | | -subdir-ccflags-y += -Wno-unused-parameter |
18 | | -subdir-ccflags-y += -Wno-type-limits |
| 6 | +# Unconditionally enable W=1 warnings locally |
| 7 | +# --- begin copy-paste W=1 warnings from scripts/Makefile.extrawarn |
| 8 | +subdir-ccflags-y += -Wextra -Wunused -Wno-unused-parameter |
| 9 | +subdir-ccflags-y += -Wmissing-declarations |
| 10 | +subdir-ccflags-y += $(call cc-option, -Wrestrict) |
| 11 | +subdir-ccflags-y += -Wmissing-format-attribute |
| 12 | +subdir-ccflags-y += -Wmissing-prototypes |
| 13 | +subdir-ccflags-y += -Wold-style-definition |
| 14 | +subdir-ccflags-y += -Wmissing-include-dirs |
| 15 | +subdir-ccflags-y += $(call cc-option, -Wunused-but-set-variable) |
| 16 | +subdir-ccflags-y += $(call cc-option, -Wunused-const-variable) |
| 17 | +subdir-ccflags-y += $(call cc-option, -Wpacked-not-aligned) |
| 18 | +subdir-ccflags-y += $(call cc-option, -Wformat-overflow) |
| 19 | +subdir-ccflags-y += $(call cc-option, -Wformat-truncation) |
| 20 | +subdir-ccflags-y += $(call cc-option, -Wstringop-overflow) |
| 21 | +subdir-ccflags-y += $(call cc-option, -Wstringop-truncation) |
| 22 | +# The following turn off the warnings enabled by -Wextra |
| 23 | +ifeq ($(findstring 2, $(KBUILD_EXTRA_WARN)),) |
19 | 24 | subdir-ccflags-y += -Wno-missing-field-initializers |
20 | | -subdir-ccflags-y += -Wno-sign-compare |
| 25 | +subdir-ccflags-y += -Wno-type-limits |
21 | 26 | subdir-ccflags-y += -Wno-shift-negative-value |
22 | | -subdir-ccflags-y += $(call cc-option, -Wunused-but-set-variable) |
23 | | -subdir-ccflags-y += $(call cc-disable-warning, frame-address) |
| 27 | +endif |
| 28 | +ifeq ($(findstring 3, $(KBUILD_EXTRA_WARN)),) |
| 29 | +subdir-ccflags-y += -Wno-sign-compare |
| 30 | +endif |
| 31 | +# --- end copy-paste |
| 32 | + |
| 33 | +# Enable -Werror in CI and development |
24 | 34 | subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror |
25 | 35 |
|
26 | 36 | # Fine grained warnings disable |
27 | 37 | CFLAGS_i915_pci.o = $(call cc-disable-warning, override-init) |
28 | 38 | CFLAGS_display/intel_display_device.o = $(call cc-disable-warning, override-init) |
29 | 39 | CFLAGS_display/intel_fbdev.o = $(call cc-disable-warning, override-init) |
30 | 40 |
|
| 41 | +# Support compiling the display code separately for both i915 and xe |
| 42 | +# drivers. Define I915 when building i915. |
| 43 | +subdir-ccflags-y += -DI915 |
| 44 | + |
31 | 45 | subdir-ccflags-y += -I$(srctree)/$(src) |
32 | 46 |
|
33 | 47 | # Please keep these build lists sorted! |
@@ -265,6 +279,7 @@ i915-y += \ |
265 | 279 | display/intel_global_state.o \ |
266 | 280 | display/intel_hdcp.o \ |
267 | 281 | display/intel_hdcp_gsc.o \ |
| 282 | + display/intel_hdcp_gsc_message.o \ |
268 | 283 | display/intel_hotplug.o \ |
269 | 284 | display/intel_hotplug_irq.o \ |
270 | 285 | display/intel_hti.o \ |
|
0 commit comments