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 \
83 # general-purpose microcontroller (GuC) support
84 i915-y += intel_uc.o \
91 intel_guc_submission.o \
94 # autogenerated null render state
95 i915-y += intel_renderstate_gen6.o \
96 intel_renderstate_gen7.o \
97 intel_renderstate_gen8.o \
98 intel_renderstate_gen9.o
100 # modesetting core code
101 i915-y += intel_audio.o \
103 intel_atomic_plane.o \
111 intel_fifo_underrun.o \
112 intel_frontbuffer.o \
120 i915-$(CONFIG_ACPI) += intel_acpi.o intel_opregion.o
121 i915-$(CONFIG_DRM_FBDEV_EMULATION) += intel_fbdev.o
123 # modesetting output/encoder code
124 i915-y += dvo_ch7017.o \
132 intel_dp_aux_backlight.o \
133 intel_dp_link_training.o \
137 intel_dsi_dcs_backlight.o \
149 # Post-mortem debug and GPU hang state capture
150 i915-$(CONFIG_DRM_I915_CAPTURE_ERROR) += i915_gpu_error.o
151 i915-$(CONFIG_DRM_I915_SELFTEST) += \
152 selftests/i915_random.o \
153 selftests/i915_selftest.o
156 i915-y += i915_vgpu.o
159 i915-y += i915_perf.o \
174 ifeq ($(CONFIG_DRM_I915_GVT),y)
175 i915-y += intel_gvt.o
176 include $(src)/gvt/Makefile
179 # LPE Audio for VLV and CHT
180 i915-y += intel_lpe_audio.o
182 obj-$(CONFIG_DRM_I915) += i915.o