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)
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-y += $(call cc-disable-warning, uninitialized)
26 subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
28 # Fine grained warnings disable
29 CFLAGS_i915_pci.o = $(call cc-disable-warning, override-init)
30 CFLAGS_intel_fbdev.o = $(call cc-disable-warning, override-init)
33 $(call as-instr,movntdqa (%eax)$(comma)%xmm0,-DCONFIG_AS_MOVNTDQA)
36 include $(src)/Makefile.header-test
38 subdir-ccflags-y += -I$(src)
40 # Please keep these build lists sorted!
43 i915-y += i915_drv.o \
63 i915_user_extensions.o
65 i915-$(CONFIG_COMPAT) += i915_ioc32.o
66 i915-$(CONFIG_DEBUG_FS) += i915_debugfs.o intel_pipe_crc.o
67 i915-$(CONFIG_PERF_EVENTS) += i915_pmu.o
69 # "Graphics Technology" (aka we talk to the gpu)
72 gt/intel_breadcrumbs.o \
74 gt/intel_engine_cs.o \
75 gt/intel_engine_pm.o \
77 gt/intel_hangcheck.o \
80 gt/intel_ringbuffer.o \
83 gt/intel_workarounds.o
84 gt-$(CONFIG_DRM_I915_SELFTEST) += \
88 # GEM (Graphics Execution Management) code
91 gem/i915_gem_clflush.o \
92 gem/i915_gem_context.o \
93 gem/i915_gem_dmabuf.o \
94 gem/i915_gem_domain.o \
95 gem/i915_gem_execbuffer.o \
96 gem/i915_gem_fence.o \
97 gem/i915_gem_internal.o \
98 gem/i915_gem_object.o \
100 gem/i915_gem_pages.o \
101 gem/i915_gem_phys.o \
103 gem/i915_gem_shmem.o \
104 gem/i915_gem_shrinker.o \
105 gem/i915_gem_stolen.o \
106 gem/i915_gem_tiling.o \
107 gem/i915_gem_userptr.o \
113 i915_gem_batch_pool.o \
115 i915_gem_fence_reg.o \
118 i915_gem_render_state.o \
124 i915_trace_points.o \
128 # general-purpose microcontroller (GuC) support
129 i915-y += intel_uc.o \
136 intel_guc_submission.o \
140 # autogenerated null render state
141 i915-y += intel_renderstate_gen6.o \
142 intel_renderstate_gen7.o \
143 intel_renderstate_gen8.o \
144 intel_renderstate_gen9.o
146 # modesetting core code
147 i915-y += intel_audio.o \
149 intel_atomic_plane.o \
160 intel_fifo_underrun.o \
161 intel_frontbuffer.o \
169 i915-$(CONFIG_ACPI) += intel_acpi.o intel_opregion.o
170 i915-$(CONFIG_DRM_FBDEV_EMULATION) += intel_fbdev.o
172 # modesetting output/encoder code
173 i915-y += dvo_ch7017.o \
182 intel_dp_aux_backlight.o \
183 intel_dp_link_training.o \
187 intel_dsi_dcs_backlight.o \
201 # Post-mortem debug and GPU hang state capture
202 i915-$(CONFIG_DRM_I915_CAPTURE_ERROR) += i915_gpu_error.o
203 i915-$(CONFIG_DRM_I915_SELFTEST) += \
204 gem/selftests/igt_gem_utils.o \
205 selftests/i915_random.o \
206 selftests/i915_selftest.o \
207 selftests/igt_flush_test.o \
208 selftests/igt_live_test.o \
209 selftests/igt_reset.o \
210 selftests/igt_spinner.o
213 i915-y += i915_vgpu.o
216 i915-y += i915_perf.o \
232 ifeq ($(CONFIG_DRM_I915_GVT),y)
233 i915-y += intel_gvt.o
234 include $(src)/gvt/Makefile
237 # LPE Audio for VLV and CHT
238 i915-y += intel_lpe_audio.o
240 obj-$(CONFIG_DRM_I915) += i915.o
241 obj-$(CONFIG_DRM_I915_GVT_KVMGT) += gvt/kvmgt.o