1 # SPDX-License-Identifier: GPL-2.0
3 # Makefile for the drm device driver. This driver provides support for the
4 # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
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.
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
-Wvla
16 subdir-ccflags-y
+= $(call cc-disable-warning
, unused-parameter
)
17 subdir-ccflags-y
+= $(call cc-disable-warning
, type-limits
)
18 subdir-ccflags-y
+= $(call cc-disable-warning
, missing-field-initializers
)
19 subdir-ccflags-y
+= $(call cc-disable-warning
, implicit-fallthrough
)
20 subdir-ccflags-y
+= $(call cc-disable-warning
, unused-but-set-variable
)
22 subdir-ccflags-y
+= $(call cc-disable-warning
, sign-compare
)
23 subdir-ccflags-y
+= $(call cc-disable-warning
, sometimes-uninitialized
)
24 subdir-ccflags-y
+= $(call cc-disable-warning
, initializer-overrides
)
25 subdir-ccflags-
$(CONFIG_DRM_I915_WERROR
) += -Werror
27 # Fine grained warnings disable
28 CFLAGS_i915_pci.o
= $(call cc-disable-warning
, override-init
)
29 CFLAGS_intel_fbdev.o
= $(call cc-disable-warning
, override-init
)
32 $(call as-instr
,movntdqa
(%eax
)$(comma
)%xmm0
,-DCONFIG_AS_MOVNTDQA
)
34 # Please keep these build lists sorted!
37 i915-y
:= i915_drv.o \
53 i915-
$(CONFIG_COMPAT
) += i915_ioc32.o
54 i915-
$(CONFIG_DEBUG_FS
) += i915_debugfs.o intel_pipe_crc.o
55 i915-
$(CONFIG_PERF_EVENTS
) += i915_pmu.o
58 i915-y
+= i915_cmd_parser.o \
59 i915_gem_batch_pool.o \
64 i915_gem_execbuffer.o \
65 i915_gem_fence_reg.o \
70 i915_gem_render_state.o \
90 # general-purpose microcontroller (GuC) support
91 i915-y
+= intel_uc.o \
98 intel_guc_submission.o \
102 # autogenerated null render state
103 i915-y
+= intel_renderstate_gen6.o \
104 intel_renderstate_gen7.o \
105 intel_renderstate_gen8.o \
106 intel_renderstate_gen9.o
108 # modesetting core code
109 i915-y
+= intel_audio.o \
111 intel_atomic_plane.o \
119 intel_fifo_underrun.o \
120 intel_frontbuffer.o \
128 i915-
$(CONFIG_ACPI
) += intel_acpi.o intel_opregion.o
129 i915-
$(CONFIG_DRM_FBDEV_EMULATION
) += intel_fbdev.o
131 # modesetting output/encoder code
132 i915-y
+= dvo_ch7017.o \
141 intel_dp_aux_backlight.o \
142 intel_dp_link_training.o \
145 intel_dsi_dcs_backlight.o \
158 # Post-mortem debug and GPU hang state capture
159 i915-
$(CONFIG_DRM_I915_CAPTURE_ERROR
) += i915_gpu_error.o
160 i915-
$(CONFIG_DRM_I915_SELFTEST
) += \
161 selftests
/i915_random.o \
162 selftests
/i915_selftest.o \
163 selftests
/igt_flush_test.o
166 i915-y
+= i915_vgpu.o
169 i915-y
+= i915_perf.o \
185 ifeq ($(CONFIG_DRM_I915_GVT
),y
)
186 i915-y
+= intel_gvt.o
187 include $(src
)/gvt
/Makefile
190 # LPE Audio for VLV and CHT
191 i915-y
+= intel_lpe_audio.o
193 obj-
$(CONFIG_DRM_I915
) += i915.o