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
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)
21 subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
23 # Fine grained warnings disable
24 CFLAGS_i915_pci.o = $(call cc-disable-warning, override-init)
25 CFLAGS_intel_fbdev.o = $(call cc-disable-warning, override-init)
28 $(call as-instr,movntdqa (%eax)$(comma)%xmm0,-DCONFIG_AS_MOVNTDQA)
30 # Please keep these build lists sorted!
33 i915-y := i915_drv.o \
48 i915-$(CONFIG_COMPAT) += i915_ioc32.o
49 i915-$(CONFIG_DEBUG_FS) += i915_debugfs.o intel_pipe_crc.o
50 i915-$(CONFIG_PERF_EVENTS) += i915_pmu.o
53 i915-y += i915_cmd_parser.o \
54 i915_gem_batch_pool.o \
59 i915_gem_execbuffer.o \
60 i915_gem_fence_reg.o \
65 i915_gem_render_state.o \
84 # general-purpose microcontroller (GuC) support
85 i915-y += intel_uc.o \
92 intel_guc_submission.o \
96 # autogenerated null render state
97 i915-y += intel_renderstate_gen6.o \
98 intel_renderstate_gen7.o \
99 intel_renderstate_gen8.o \
100 intel_renderstate_gen9.o
102 # modesetting core code
103 i915-y += intel_audio.o \
105 intel_atomic_plane.o \
113 intel_fifo_underrun.o \
114 intel_frontbuffer.o \
122 i915-$(CONFIG_ACPI) += intel_acpi.o intel_opregion.o
123 i915-$(CONFIG_DRM_FBDEV_EMULATION) += intel_fbdev.o
125 # modesetting output/encoder code
126 i915-y += dvo_ch7017.o \
134 intel_dp_aux_backlight.o \
135 intel_dp_link_training.o \
139 intel_dsi_dcs_backlight.o \
151 # Post-mortem debug and GPU hang state capture
152 i915-$(CONFIG_DRM_I915_CAPTURE_ERROR) += i915_gpu_error.o
153 i915-$(CONFIG_DRM_I915_SELFTEST) += \
154 selftests/i915_random.o \
155 selftests/i915_selftest.o
158 i915-y += i915_vgpu.o
161 i915-y += i915_perf.o \
176 ifeq ($(CONFIG_DRM_I915_GVT),y)
177 i915-y += intel_gvt.o
178 include $(src)/gvt/Makefile
181 # LPE Audio for VLV and CHT
182 i915-y += intel_lpe_audio.o
184 obj-$(CONFIG_DRM_I915) += i915.o